Re: Weird processes

From: dima <_pppp(at)mail(dot)ru>
To: Gary DeSorbo <isasitis(at)uchicago(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Weird processes
Date: 2002-11-14 07:47:20
Message-ID: 3DD35508.6010207@mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

every concurrent cgi script uses its own postgres connection in your
case. you're going to run into more serious problems (e.g. empty pages
for no reason) because of lack of possible postgres connections. so,
1) try mod_perl to speed up your perl scripts
2) think about writing a server which would provide cgi scripts with
cached connections; you can $handle->prepare(...) the most common
queries as well.

anyway, it's not a postgres problem. if you wish to discuss that you may
write me in private or try a www-developers mail-list.

> I have been having some problems with my database/web server machine and
> ma having difficulty in finding out what the problem is. I have two
> machines configured exactly the same; one for development and one for
> production. Pages on production are taking up to 10X longer to load than
> the same pages on development. We have tested the line speeds and they
> are comparable.
>
> I have been searching through the processes and have come across some
> items that I have never seen on the machine before. The processes listed
> below seem to be hanging around much longer than they should be. Perl is
> the cgi and the only postgres user on this machine is the web server.
> Any help would be greatly appreciated. Below is the output:
>
> postgres 7633 2.6 2.2 505612 45968 ? S 10:57 0:02 postgres:
> postgres pro [local] SELECT
> nobody 7679 1.7 0.7 16792 15616 ? S 10:57 0:01 perl
> /www/cgi-bin/reporting/report_search.pl
> nobody 7682 1.5 0.3 8712 7548 ? S 10:57 0:01 perl
> /www/cgi-bin/staffing/orderconfirmation.pl
> postgres 7684 2.5 1.5 505100 32864 ? S 10:57 0:02 postgres:
> postgres pro [local] SELECT
> postgres 7685 1.4 1.6 505008 34508 ? S 10:57 0:01 postgres:
> postgres pro [local] idle
> postgres 7758 3.9 2.2 505088 45864 ? S 10:58 0:02 postgres:
> postgres pro [local] SELECT
> nobody 7768 0.7 0.3 8832 7672 ? S 10:58 0:00 perl
> /www/cgi-bin/userapp/csc/contractor/contractorsearch.pl
> postgres 7769 2.2 1.5 505096 32864 ? S 10:58 0:01 postgres:
> postgres pro [local] SELECT
> nobody 7800 0.0 0.1 5384 2596 ? S 10:58 0:00
> /www/bin/httpd -DSSL
> nobody 7842 0.3 0.3 8768 7600 ? S 10:58 0:00 perl
> /www/cgi-bin/passthru.pl
> nobody 7846 0.4 0.3 8768 7600 ? S 10:58 0:00 perl
> /www/cgi-bin/passthru.pl
> postgres 7853 2.5 1.5 505096 32860 ? S 10:58 0:01 postgres:
> postgres pro [local] SELECT
> nobody 7861 0.8 0.3 8624 7448 ? S 10:58 0:00 perl
> /www/cgi-bin/staffing/supplier/resumesearch.pl
> postgres 7862 2.5 1.5 505100 32860 ? S 10:58 0:01 postgres:
> postgres pro [local] SELECT
> postgres 7870 1.6 1.5 505100 32916 ? S 10:58 0:00 postgres:
> postgres pro [local] idle
> nobody 7871 0.5 0.3 8776 7608 ? S 10:58 0:00 perl
> /www/cgi-bin/staffing/orderdetail.pl
> postgres 7875 2.4 1.5 505100 32864 ? S 10:58 0:01 postgres:
> postgres pro [local] SELECT
> nobody 7891 0.9 0.3 8840 7680 ? S 10:58 0:00 perl
> /www/cgi-bin/staffing/csc/orderdetailedit.pl
> postgres 7896 5.6 2.2 505612 46236 ? S 10:58 0:02 postgres:
> postgres pro [local] SELECT
> nobody 7917 0.8 0.3 8644 7468 ? S 10:58 0:00 perl
> /www/cgi-bin/timecard/csc/force_process.pl
> postgres 7925 1.9 1.5 505100 32784 ? S 10:58 0:00 postgres:
> postgres pro [local] UPDATE
> nobody 7946 1.2 0.3 8640 7472 ? S 10:58 0:00 perl
> /www/cgi-bin/staffing/orderdetail.pl
> postgres 7948 4.1 1.7 505016 35372 ? R 10:58 0:01 postgres:
> postgres pro [local] SELECT
> nobody 7950 0.0 0.1 5384 2592 ? S 10:58 0:00
> /www/bin/httpd -DSSL
> nobody 7971 0.0 0.1 5384 2512 ? S 10:58 0:00
> /www/bin/httpd -DSSL
> nobody 7993 1.5 0.3 8844 7684 ? S 10:58 0:00 perl
> /www/cgi-bin/timecard/csc/create_invoice_search_form.pl
> nobody 7994 1.9 0.3 8688 7508 ? S 10:58 0:00 perl
> /www/cgi-bin/timecard/supplier/submit_days.pl
> nobody 8004 1.3 0.3 8732 7564 ? S 10:58 0:00 perl
> /www/cgi-bin/staffing/csc/financial_detail.pl
> postgres 8005 3.8 1.5 505100 32876 ? S 10:58 0:01 postgres:
> postgres pro [local] SELECT
> postgres 8007 0.7 1.1 505100 23268 ? S 10:58 0:00 postgres:
> postgres pro [local] SELECT
> postgres 8010 1.8 1.6 505096 34000 ? S 10:58 0:00 postgres:
> postgres pro [local] UPDATE
> nobody 8040 2.9 0.3 8844 7684 ? S 10:59 0:00 perl
> /www/cgi-bin/timecard/csc/create_invoice_search_form.pl
> postgres 8047 3.6 1.5 505100 32876 ? S 10:59 0:00 postgres:
> postgres pro [local] SELECT
> nobody 8058 3.1 0.3 8692 7528 ? S 10:59 0:00 perl
> /www/cgi-bin/login.pl
> nobody 8063 3.5 0.3 8716 7540 ? S 10:59 0:00 perl
> /www/cgi-bin/userapp/csc/contractor/basic_info/basic_info.ppostgres
> 8069 0.8 1.0 505028 22104 ? S 10:59 0:00 postgres: postgres
> pro [local] SELECT
> postgres 8074 4.5 1.5 505096 32904 ? S 10:59 0:00 postgres:
> postgres pro [local] idle
> nobody 8105 0.0 0.0 5260 1808 ? S 10:59 0:00
> /www/bin/httpd -DSSL
> nobody 8109 7.5 0.3 8860 7684 ? S 10:59 0:00 perl
> /www/cgi-bin/timecard/supplier/process_days.pl
> postgres 8113 2.0 0.8 505100 16692 ? S 10:59 0:00 postgres:
> postgres pro [local] SELECT
> nobody 8114 17.0 0.3 8852 7672 ? S 10:59 0:00 perl
> /www/cgi-bin/timecard/supplier/process_days.pl
> postgres 8115 4.0 0.7 505100 15568 ? S 10:59 0:00 postgres:
> postgres pro [local] SELECT
> nobody 8117 21.3 0.3 8692 7528 ? S 10:59 0:00 perl
> /www/cgi-bin/login.pl
> postgres 8118 7.0 0.9 505028 19256 ? S 10:59 0:00 postgres:
> postgres pro [local] SELECT
> nobody 8123 29.5 0.3 8584 7396 ? S 10:59 0:00 perl
> /www/cgi-bin/passthru.pl
> postgres 8127 26.0 1.2 505100 25156 ? S 10:59 0:00 postgres:
> postgres pro [local] SELECT
>
> Gary DeSorbo
> isasitis(at)uchicago(dot)edu
> Cell: 415.606.3857
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Chris Miles 2002-11-14 07:59:12 Re: Replication MSSQL-PostgreSQL - any success?
Previous Message Tom Lane 2002-11-14 04:20:56 Re: Weird processes