1 (edited by 105547111 2011-09-16 07:56:00)

Topic: Question on httpd stalling intermittently

Okay, I have a centos 6 x86 server, running plesk. We have some php / SQL based forums on a domain. Now this never happened on centos 5 only on 6.

If you load up a post, then start reading others, or posting, sooner or later you hot this huge 15 second pause. It then may be good for a while.

The server is quad 3.0 GHz with 4 GB RAM. It never complains using too much RAm or CPU. You can have 50 uses and It does it, or 350 and it's no worse or better.

Any ideas where to look? I played with my.cnf, upped some cache and so forth - no change.

I ended up compling a new httpd and php to see if it helps.

What's interesting, when I get this stalling issue, I have a static HTML page with the weather, this always loads without hesitation. Therefore I know it's related to php or mysql.

Re: Question on httpd stalling intermittently

Which apache mode ? (prefork or worker)

It seems only mysql is stalled (as static page still served), so check running request ("show processlist" in mysql).
Perhaps a lock issue.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Question on httpd stalling intermittently

Hi Remi,

I don't know which mode.

These are my.cnf additions:

query_cache_size=32M
tmp_table_size=128M
max_heap_table_size=128M
key_buffer_size=32M
table_cache=128

This speeded up things a little bit, and sql looks better in terms of stats.

But its weird a 15 second delay, just like something in httpd timing out.  Yet plesk notifies if anything goes over 20% use or RAM or CPU and the load is never high.

Once I got a proxy error page after the wait. Strange as it happened here where I do connect to the web site over a static route, so there is no proxy server anywhere.

Any idea where to look or what configs you need to see?

Thanks again!

Re: Question on httpd stalling intermittently

the "show processlist" will be really usefull.

And mysqltuner generally give usefull information for tunning.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

5 (edited by 105547111 2011-09-16 09:39:08)

Re: Question on httpd stalling intermittently

Traffic     ø per hour
Received    0.3 GiB    10.5 MiB
Sent    2.9 GiB    0.1 GiB
Total    3.2 GiB    0.1 GiB

Connections    ø per hour    %

max. concurrent connections    40    ---    ---
Failed attempts    1,664    56.82    2.28%
Aborted    96    3.28    0.13%
Total    73 k    2,494.56    100.00%


72872    auscity    localhost    auscity    Sleep    21       
72882    auscity    localhost    auscity    Sleep    11       
72884    auscity    localhost    auscity    Sleep    5       
72885    auscity    localhost    auscity    Sleep    0       
72886    auscity    localhost    auscity    Query    0        Show processlist

Thanks again!

Re: Question on httpd stalling intermittently

The processlist must be run when the server seems stalled...

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Question on httpd stalling intermittently

It was stalled here:

Kill    58    admin    localhost    psa    Sleep    207        NULL
Kill    97787    tortix    localhost:55034    tortix    Sleep    7        NULL
Kill    103447    auscity    localhost    auscity    Sleep    35        NULL
Kill    103449    auscity    localhost    auscity    Sleep    34        NULL
Kill    103476    auscity    localhost    auscity    Sleep    13        NULL
Kill    103477    auscity    localhost    auscity    Sleep    13        NULL
Kill    103478    auscity    localhost    auscity    Sleep    12        NULL
Kill    103479    auscity    localhost    auscity    Sleep    12        NULL
Kill    103482    auscity    localhost    auscity    Sleep    7        NULL
Kill    103485    admin    localhost    psa    Sleep    0        NULL
Kill    103486    pma_c4LUQ8s5cvya    localhost    NULL    Sleep    0        NULL
Kill    103487    admin    localhost    NULL    Query    0    NULL    Show processlist


And later here:

Kill    58    admin    localhost    psa    Sleep    110        NULL
Kill    97787    tortix    localhost:55034    tortix    Sleep    3        NULL
Kill    103601    auscity    localhost    auscity    Sleep    18        NULL
Kill    103602    auscity    localhost    auscity    Sleep    14        NULL
Kill    103605    auscity    localhost    auscity    Sleep    9        NULL
Kill    103618    auscity    localhost    auscity    Sleep    2        NULL
Kill    103622    admin    localhost    psa    Sleep    1        NULL
Kill    103623    scannerdesk    localhost    scannerdesk    Sleep    0        NULL
Kill    103624    scannerdesk    localhost    scannerdesk    Sleep    1        NULL
Kill    103625    pma_c4LUQ8s5cvya    localhost    NULL    Sleep    0        NULL
Kill    103626    admin    localhost    NULL    Query    0    NULL    Show processlist

Re: Question on httpd stalling intermittently

I updated httpd to 2.2.21, mysql to 5.1.59 and it is a lot better. I still get intermittent pauses, but less often.  Could it be some php setting?  I have a lot of php functions disabled.  I also will double the server RAM from 4 to 8GB

disable_functions =  , curl_multi_exec , dl , exec , passthru , pcntl_exec , pfsockopen , popen , posix_kill , posix_mkfifo , posix_setuid , proc_close , proc_open , proc_terminate , shell_exec , system , ftp_exec , leak , posix_setpgid , posix_setsid , proc_get_status , proc_nice , show_source , escapeshellcmd