resources limit php -> postgre
resources limit php -> postgre
am 20.04.2003 03:57:52 von dm_mailings
Hi,
There is my problem :
When a user runs on my apache-php-pgsql a badly written php script /
page (which for example infinitely loops on an insert or anything else
who saturate my Postgre), other php pages relying on PG become purely
unavailable until this "bad script" aborts.
Is there a way to define a 'per script' limit on php/PG, or anything
else in order to avoid these problems ?
Thank you in advance !
DM
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
Re: resources limit php -> postgre
am 20.04.2003 11:45:56 von adriantineo
> Is there a way to define a 'per script' limit on php/PG, or anything
> else in order to avoid these problems ?
You can set a maximum time for execution. This is set for every script in
php.ini with max_execution_time (default is 30 seconds). You can re-define
your ini value though using ini_set("max_execution_time",$max_time) in every
script that has special needs. You can check
http://www.php.net/manual/en/function.ini-set.php for more info on ini_set
and setting values.
Adrian Tineo
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
Re: resources limit php -> postgre
am 20.04.2003 21:02:27 von dm_mailings
> You can set a maximum time for execution. This is set for every
script in
> php.ini with max_execution_time (default is 30 seconds).
Thanks for your answer. but this has already been done.
And until it aborts (30 sec) no more DB access...
What I'm looking for is a setting or a way to NEVER let 1 php script
hangs the entire database resources ?
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
Re: resources limit php -> postgre
am 22.04.2003 13:18:41 von dm_mailings
Seems it's not after all a Postgre problem... The Apache/php server was in
fact very slow due to loops, but not totally unavailable... A bigger CPU
helped a lot.
And indeed, lowering max_execution_time helps a lot !
Thanks for your replies !
> > You can set a maximum time for execution. This is set for every
> script in
> > php.ini with max_execution_time (default is 30 seconds).
>
> Thanks for your answer. but this has already been done.
> And until it aborts (30 sec) no more DB access...
>
> What I'm looking for is a setting or a way to NEVER let 1 php script
> hangs the entire database resources ?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org