Re: Disk acces

Поиск
Список
Период
Сортировка
От Mitch Vincent
Тема Re: Disk acces
Дата
Msg-id 006501c08baf$050ba200$0200000a@windows
обсуждение исходный текст
Ответ на Disk acces  ("Anders R. Sveen" <anderssv@stud.ntnu.no>)
Ответы Re: Re: Disk acces  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general
Hi Doug, your comments caught my eye and I thought I'd ask you something..
Are you speaking of using persistant connections with PHP? I'm not sure what
Enhydra is, so forgive me if this is totally off base..

We do a lot of development in PHP and only use PostgreSQL, I've tried and
tried to get persistant connections to work but every time I use them, very
strange things start to happen (variables disappearing and getting corruted
to name one).. It was said a while back on the list that the most probable
reason for that is that PHP isn't thread safe and that was probably the
cause.. Another strange, though not surprising thing that happens is that if
you begin a transaction in a PHP script and the script is terminated before
you comit or rollback (be that from the user clicing stop or a script/server
error), the transaction is left open for the next time that backend is
used -- it's caused a lot of problems.. I say it's not surprising because
that's exactly what I'd expect to happen, there just doesn't seem to be much
of a way to prevent it in some cases.. I've tried the ignore_user_abort but
it still happened quite a lot. (I'm spoiled with Ruby and ensure :-) )..

Have you had those kinds of problems and if so how did you overcome them?
Does Enhydra manage your database/web server pool?

Thanks!!

-Mitch

----- Original Message -----
From: "Doug McNaught" <doug@wireboard.com>
To: "Anders R. Sveen" <anderssv@stud.ntnu.no>
Cc: "pgsql-general" <pgsql-general@postgresql.org>
Sent: Wednesday, January 31, 2001 12:39 PM
Subject: Re: Disk acces


> "Anders R. Sveen" <anderssv@stud.ntnu.no> writes:
>
> > I'm running PostgreSQL 7.0.3 on an Pentium 120 with IDE and 48MB RAM. No
> > monster, i know that. But i was wondering if anyone had some performance
> > tips?
> >
> > We're building a new site wich uses the database for alot of it's pages.
> > It seems that when a hit occurs you get an eccessive amount of disk
> > access. It really slows the site down. Any idea?
>
> Sounds like "add more memory" is the main tip that people will give
> you.  May not be possible, I know,
>
> You don't say what language the site is written in but if it's
> straight CGI you're paying for a fork/exec per page, plus connecting
> to the database every time.  You may want to use PHP or something
> similar that runs in the webserver and maintains a DB connection pool.
> (I like Enhydra myself but it's way too heavyweight for your
> machine).
>
> -Doug
>


В списке pgsql-general по дате отправления:

Предыдущее
От: "Mike Sears"
Дата:
Сообщение: Re: php as stored procedures
Следующее
От: mwaples@waples.net
Дата:
Сообщение: Re: php as stored procedures