pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedresources limit php -> postgre
4+ messages / 2 participants
[nested] [flat]
* resources limit php -> postgre
@ 2003-04-20 01:57 Damien M. <dm_mailings@abelia-decors.com>
0 siblings, 1 reply; 4+ messages in thread
From: Damien M. @ 2003-04-20 01:57 UTC (permalink / raw)
To: pgsql-php
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: resources limit php -> postgre
@ 2003-04-20 09:45 Adrian Tineo <adriantineo@softhome.net>
parent: Damien M. <dm_mailings@abelia-decors.com>
0 siblings, 0 replies; 4+ messages in thread
From: Adrian Tineo @ 2003-04-20 09:45 UTC (permalink / raw)
To: Damien M. <dm_mailings@abelia-decors.com>; pgsql-php
> 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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: resources limit php -> postgre
@ 2003-04-20 19:02 Damien M. <dm_mailings@abelia-decors.com>
0 siblings, 0 replies; 4+ messages in thread
From: Damien M. @ 2003-04-20 19:02 UTC (permalink / raw)
To: pgsql-php
> 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 ?
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: resources limit php -> postgre
@ 2003-04-22 11:18 Damien M. <dm_mailings@abelia-decors.com>
0 siblings, 0 replies; 4+ messages in thread
From: Damien M. @ 2003-04-22 11:18 UTC (permalink / raw)
To: pgsql-php
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
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-04-22 11:18 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-20 01:57 resources limit php -> postgre Damien M. <dm_mailings@abelia-decors.com>
2003-04-20 09:45 ` Adrian Tineo <adriantineo@softhome.net>
2003-04-20 19:02 Re: resources limit php -> postgre Damien M. <dm_mailings@abelia-decors.com>
2003-04-22 11:18 Re: resources limit php -> postgre Damien M. <dm_mailings@abelia-decors.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox