You are here: Re: Reentrant POST hangs the session « PHP Programming Language « IT news, forums, messages
Re: Reentrant POST hangs the session

Posted by Erwin Moller on 10/15/74 11:39

a wrote:

>
>> If I was in your situation I would first try to figure out if the
>> systemcall
>> sometimes hangs. Maybe by making a script that calls in 100 times in a
>> row (increase the scriptimeout first).
>> Also try to figure out if the systemcall you make is maybe getting in
>> trouble if it is called many times in the same second. (Maybe it is not
>> threadsafe.)
>
> My tests indicate that the script is run synchronously anyway, i.e. any
> new post will wait for current php script processing to end before
> starting the same script over.

Is that test done WITH sessions enabled?
Then every request to ANY script will wait that uses that session.

That is why is advised you to disable session if you test this.
If you both have session ebabled AND doing systemscalls, you do not know
what you are testing.

Also, the process called by exec starts and
> ends fine, it doesn't hang. I even changed it to exit immediately, just to
> make sure there were no other interferences. So the script hangs between
> the exit of my process and its return to the script.

Are you sure?
I mean: Did you leave some trace that the beginning of the php-script DID
run untill it reached the systemcall?

>
> Also, 2 fast POSTs will not hang the script, only if there are more than
> 2, sometimes 3, sometimes 4. So maybe there is a race condition between
> the waiting posts, rather than between the one being processed and the one
> (or more) waiting.

PHP is completely able to run the same script simultaniously 100 times, as
long as there is no session (and thus possibly locking) involved.
Your problem must be more subtile.

>
> I will run some more tests where instead of doing exec, I will use some
> other interprocess communication mechanism (tcp/ip for example) see if
> this changes anything.
>
> Thanks for your interest in this.

Good luck.

>
> A

Keep us informed. :-)

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация