<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>[PHP] Performance / AB issue?</title>
        <description> Hi there,

I have apache-2.22/php 5.3.10 set up on a dedicated server but I have a
strange issue.

I have made a Drupal 7 site with a mysql db.

If I stress-test the site with : ab -c 1 -n 150 http://sitename/ it works
fine.
If I stress-test the site with : ab -c 2 -n 20 http://sitename/ it kills
apache.
If I stress-test the site with : ab -c 50 -n 1500
http://sitename/static.html it works fine.

I have set apache's errorlog to debug. But it writes nothing, either in
the virtualhost or in the server-file.

Can anyone give a hint about what can be wrong?


Best regards
LFWeb
Lars Nielsen


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php</description>
        <link>http://www.serverphorums.com/read.php?8,493500,493500#msg-493500</link>
        <lastBuildDate>Tue, 18 Jun 2013 23:57:43 +0200</lastBuildDate>
        <generator>Phorum 5.2.18</generator>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,493500,496402#msg-496402</guid>
            <title>Re: [PHP] Performance / AB issue?</title>
            <link>http://www.serverphorums.com/read.php?8,493500,496402#msg-496402</link>
            <description><![CDATA[ &gt;<br />
&gt;&gt; On Fri, May 11, 2012 at 9:53 AM, Camilo Sperberg &lt;unreal4u@gmail.com&gt;<br />
&gt;&gt; wrote:<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; Sent from my iPhone 5 Beta [Confidential use only]<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; On 11 mei 2012, at 07:09, &quot;Lars Nielsen&quot; &lt;lars@lfweb.dk&gt; wrote:<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; On 10 mei 2012, at 23:26, Lars Nielsen wrote:<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Sent from my iPhone 5 Beta [Confidential use only]<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; On 10 mei 2012, at 17:40, Matijn Woudt &lt;tijnema@gmail.com&gt; wrote:<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen &lt;lars@lfweb.dk&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; wrote:<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi there,<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I have apache-2.22/php 5.3.10 set up on a dedicated server but I<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; have<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; a<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; strange issue.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I have made a Drupal 7 site with a mysql db.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 1 -n 150 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a><br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; it<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; works<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; fine.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 2 -n 20 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a><br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; it<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; kills<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; apache.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 50 -n 1500<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://sitename/static.html" target="_blank"  rel="nofollow">http://sitename/static.html</a> it works fine.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I have set apache's errorlog to debug. But it writes nothing,<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; either<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; in<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; the virtualhost or in the server-file.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Can anyone give a hint about what can be wrong?<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; What do you mean with 'kills apache', does it terminate apache or<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; does<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; apache hang (eg. 100% cpu), and respond normal after the stress<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; test<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; is over?<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; And what is the index of your site? A php script, or..? Do you<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; have<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ModRewrite redirects etc?<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; - Matijn<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Can you visit the site normally? Try less verbosing in apache, that<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; is<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pretty intensive, but as you can benchmark a static file well (with<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; moderate high settings), i assume it is some configuration problem<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; in<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; drupal.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Greeting.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; Hi,<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; I can visit the site normaly, but with 2-3 concurrent ab test it<br />
&gt;&gt;&gt;&gt;&gt;&gt; fails.<br />
&gt;&gt;&gt;&gt;&gt;&gt; seen from 'ps' and 'htop' it seems that both apache and mysql<br />
&gt;&gt;&gt;&gt;&gt;&gt; continues<br />
&gt;&gt;&gt;&gt;&gt;&gt; to<br />
&gt;&gt;&gt;&gt;&gt;&gt; run normaly but it doesnt respond.<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; If i run netstat -an after the test it shows this :<br />
&gt;&gt;&gt;&gt;&gt;&gt; Active Internet connections (servers and established)<br />
&gt;&gt;&gt;&gt;&gt;&gt; Proto Recv-Q Send-Q Local Address Â  Â  Â  Â  Â  Foreign Address<br />
&gt;&gt;&gt;&gt;&gt;&gt; Â State<br />
&gt;&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 0.0.0.0:22 Â  Â  Â  Â  Â  Â  Â 0.0.0.0:*<br />
&gt;&gt;&gt;&gt;&gt;&gt; Â  Â  Â  Â LISTEN<br />
&gt;&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 127.0.0.1:25 Â  Â  Â  Â  Â  Â 0.0.0.0:*<br />
&gt;&gt;&gt;&gt;&gt;&gt; Â <br />
&gt;&gt;&gt;&gt;&gt;&gt; Â  Â  Â LISTEN<br />
&gt;&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 127.0.0.1:3306 Â  Â  Â  Â  Â 0.0.0.0:* Â <br />
&gt;&gt;&gt;&gt;&gt;&gt; Â  Â  Â LISTEN<br />
&gt;&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 0.0.0.0:80 Â  Â  Â  Â  Â  Â  Â 0.0.0.0:*<br />
&gt;&gt;&gt;&gt;&gt;&gt; Â  Â  Â  Â LISTEN<br />
&gt;&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 1 Â  Â  Â 0 x.x.x.x:80 Â  Â  Â  Â x.x.x.x:39237 Â <br />
&gt;&gt;&gt;&gt;&gt;&gt; CLOSE_WAIT<br />
&gt;&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 1 Â  Â  Â 0 x.x.x.x:80 Â  Â  Â  Â x.x.x.x:39236 Â <br />
&gt;&gt;&gt;&gt;&gt;&gt; Â CLOSE_WAIT<br />
&gt;&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 x.x.x.x:22 Â  Â  Â  Â x.x.x.x:47383 Â <br />
&gt;&gt;&gt;&gt;&gt;&gt; Â ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 127.0.0.1:80 Â  Â  Â  Â  Â <br />
&gt;&gt;&gt;&gt;&gt;&gt; Â 127.0.0.1:34775<br />
&gt;&gt;&gt;&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 1 Â  Â  Â 0 x.x.x.x:80 Â  Â  Â  Â x.x.x.x:39300 Â <br />
&gt;&gt;&gt;&gt;&gt;&gt; Â CLOSE_WAIT<br />
&gt;&gt;&gt;&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 127.0.0.1:34775 Â  Â  Â  Â  127.0.0.1:80<br />
&gt;&gt;&gt;&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 x.x.x.x:80 Â  Â  Â  Â x.x.x.x:39330 Â <br />
&gt;&gt;&gt;&gt;&gt;&gt; Â ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt;&gt; tcp6 Â  Â  Â  0 Â  Â  Â 0 :::22 Â  Â  Â  Â  Â  Â  Â  Â  Â  :::*<br />
&gt;&gt;&gt;&gt;&gt;&gt; LISTEN<br />
&gt;&gt;&gt;&gt;&gt;&gt; tcp6 Â  Â  Â  0 Â  Â  Â 0 ::1:25 Â  Â  Â  Â  Â  Â  Â  Â  Â :::*<br />
&gt;&gt;&gt;&gt;&gt;&gt; LISTEN<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; So it does seem like there should be room for new tcp connections?<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; But if I restart apache then it works again... So I guess it is a<br />
&gt;&gt;&gt;&gt;&gt;&gt; apache/php configuration issue?<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt;&gt; Med venlig hilsen / Best Regards<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; LFWeb<br />
&gt;&gt;&gt;&gt;&gt;&gt; Lars Nielsen<br />
&gt;&gt;&gt;&gt;&gt;&gt; Thorsensvej 30<br />
&gt;&gt;&gt;&gt;&gt;&gt; 4800 NykÃ¸bing Falster<br />
&gt;&gt;&gt;&gt;&gt;&gt; Tlf: +45 20 64 85 76<br />
&gt;&gt;&gt;&gt;&gt;&gt; email : <a href="mailto:&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;">&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;</a><br />
&gt;&gt;&gt;&gt;&gt;&gt; www : <a href="http://www.lfweb.dk" target="_blank"  rel="nofollow">http://www.lfweb.dk</a><br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; Have you tried benchmarking a really simple php page, such as<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; &lt;?php echo 'hello world'; ?&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; ?<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; It that works, than it is definitely an issue in Drupal's<br />
&gt;&gt;&gt;&gt;&gt; configuration<br />
&gt;&gt;&gt;&gt;&gt; and not in PHP/Apache. Additionally, you could check what happens<br />
&gt;&gt;&gt;&gt;&gt; when<br />
&gt;&gt;&gt;&gt;&gt; you<br />
&gt;&gt;&gt;&gt;&gt; try to establish a session or make a database call to rule out those<br />
&gt;&gt;&gt;&gt;&gt; as<br />
&gt;&gt;&gt;&gt;&gt; well, just make really simple tests that you know wouldn't fail and<br />
&gt;&gt;&gt;&gt;&gt; run ab<br />
&gt;&gt;&gt;&gt;&gt; on them.<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; Greetings.<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; Thanks!<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; Now I have made<br />
&gt;&gt;&gt;&gt; &lt;?php<br />
&gt;&gt;&gt;&gt; Â echo &quot;Hey from PHP!&quot;;<br />
&gt;&gt;&gt;&gt; ?&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; It runs fine from a little concurrency. But with &quot;-c 5 -n 500&quot; it<br />
&gt;&gt;&gt;&gt; fails<br />
&gt;&gt;&gt;&gt; after 308 requests!<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; Best Regards / Med venlig hilsen<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; LFWeb<br />
&gt;&gt;&gt;&gt; Lars Nielsen<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; Have you tried benchmarking from localhost? Do you have any active<br />
&gt;&gt;&gt; firewall? Selinux? Shorewall? Anything that could block a ddos attack?<br />
&gt;&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; A firewall is not the case here. He's testing with -c 2 and is getting<br />
&gt;&gt; errors, with -c 50 on a static file not. Also, blocking a DDOS attack<br />
&gt;&gt; at only 50 connections is way too low, so I don't think that would<br />
&gt;&gt; happen.<br />
&gt;&gt;<br />
&gt;&gt; - Matijn<br />
&gt;&gt;<br />
&gt; Now i have the result of a test on localhost:<br />
&gt;<br />
&gt;<br />
&gt; ab -c 1 -n 20 <a href="http://localhost/" target="_blank"  rel="nofollow">http://localhost/</a><br />
&gt; This is ApacheBench, Version 2.3 &lt;$Revision: 655654 $&gt;<br />
&gt; Copyright 1996 Adam Twiss, Zeus Technology Ltd, <a href="http://www.zeustech.net/" target="_blank"  rel="nofollow">http://www.zeustech.net/</a><br />
&gt; Licensed to The Apache Software Foundation, <a href="http://www.apache.org/" target="_blank"  rel="nofollow">http://www.apache.org/</a><br />
&gt;<br />
&gt; Benchmarking localhost (be patient).....done<br />
&gt;<br />
&gt;<br />
&gt; Server Software:        Apache/2.2.22<br />
&gt; Server Hostname:        localhost<br />
&gt; Server Port:            80<br />
&gt;<br />
&gt; Document Path:          /<br />
&gt; Document Length:        14463 bytes<br />
&gt;<br />
&gt; Concurrency Level:      1<br />
&gt; Time taken for tests:   3.540 seconds<br />
&gt; Complete requests:      20<br />
&gt; Failed requests:        0<br />
&gt; Write errors:           0<br />
&gt; Total transferred:      298480 bytes<br />
&gt; HTML transferred:       289260 bytes<br />
&gt; Requests per second:    5.65 [#/sec] (mean)<br />
&gt; Time per request:       177.020 [ms] (mean)<br />
&gt; Time per request:       177.020 [ms] (mean, across all concurrent<br />
&gt; requests)<br />
&gt; Transfer rate:          82.33 [Kbytes/sec] received<br />
&gt;<br />
&gt; Connection Times (ms)<br />
&gt;               min  mean[+/-sd] median   max<br />
&gt; Connect:        0    0   0.0      0       0<br />
&gt; Processing:   175  177   2.1    176     182<br />
&gt; Waiting:      153  156   1.7    155     160<br />
&gt; Total:        175  177   2.1    176     182<br />
&gt;<br />
&gt; Percentage of the requests served within a certain time (ms)<br />
&gt;   50%    176<br />
&gt;   66%    177<br />
&gt;   75%    177<br />
&gt;   80%    178<br />
&gt;   90%    182<br />
&gt;   95%    182<br />
&gt;   98%    182<br />
&gt;   99%    182<br />
&gt;  100%    182 (longest request)<br />
&gt;<br />
&gt; xx@grafikom:/home/xx# ab -c 2 -n 20 <a href="http://localhost/" target="_blank"  rel="nofollow">http://localhost/</a><br />
&gt; This is ApacheBench, Version 2.3 &lt;$Revision: 655654 $&gt;<br />
&gt; Copyright 1996 Adam Twiss, Zeus Technology Ltd, <a href="http://www.zeustech.net/" target="_blank"  rel="nofollow">http://www.zeustech.net/</a><br />
&gt; Licensed to The Apache Software Foundation, <a href="http://www.apache.org/" target="_blank"  rel="nofollow">http://www.apache.org/</a><br />
&gt;<br />
&gt; Benchmarking localhost (be patient)...apr_poll: The timeout specified has<br />
&gt; expired (70007)<br />
&gt; Total of 3 requests completed<br />
&gt;<br />
&gt;<br />
&gt; Does this give any meaning?<br />
&gt;<br />
&gt;<br />
&gt; Med venlig hilsen<br />
&gt;<br />
&gt; LFWeb<br />
&gt; Lars Nielsen<br />
&gt;<br />
&gt;<br />
&gt; --<br />
&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;<br />
&gt;<br />
<br />
Arghh!!!! :-S<br />
<br />
Its an APC issue.... If I turn off php's apc it can handle multiple<br />
connections! ... have to study apc!<br />
<br />
Best regards / Med venlig hilsen<br />
<br />
LFWeb<br />
Lars Nielsen<br />
<br />
<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Lars Nielsen</dc:creator>
            <category>php-general</category>
            <pubDate>Tue, 15 May 2012 12:10:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,493500,496396#msg-496396</guid>
            <title>Re: [PHP] Performance / AB issue?</title>
            <link>http://www.serverphorums.com/read.php?8,493500,496396#msg-496396</link>
            <description><![CDATA[ &gt; On Fri, May 11, 2012 at 9:53 AM, Camilo Sperberg &lt;unreal4u@gmail.com&gt;<br />
&gt; wrote:<br />
&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; Sent from my iPhone 5 Beta [Confidential use only]<br />
&gt;&gt;<br />
&gt;&gt; On 11 mei 2012, at 07:09, &quot;Lars Nielsen&quot; &lt;lars@lfweb.dk&gt; wrote:<br />
&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; On 10 mei 2012, at 23:26, Lars Nielsen wrote:<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; Sent from my iPhone 5 Beta [Confidential use only]<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; On 10 mei 2012, at 17:40, Matijn Woudt &lt;tijnema@gmail.com&gt; wrote:<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen &lt;lars@lfweb.dk&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; wrote:<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi there,<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I have apache-2.22/php 5.3.10 set up on a dedicated server but I<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; have<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; a<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; strange issue.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I have made a Drupal 7 site with a mysql db.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 1 -n 150 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a><br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; it<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; works<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; fine.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 2 -n 20 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; kills<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; apache.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 50 -n 1500<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://sitename/static.html" target="_blank"  rel="nofollow">http://sitename/static.html</a> it works fine.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I have set apache's errorlog to debug. But it writes nothing,<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; either<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; in<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; the virtualhost or in the server-file.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Can anyone give a hint about what can be wrong?<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; What do you mean with 'kills apache', does it terminate apache or<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; does<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; apache hang (eg. 100% cpu), and respond normal after the stress<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; test<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; is over?<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; And what is the index of your site? A php script, or..? Do you have<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; ModRewrite redirects etc?<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; - Matijn<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; Can you visit the site normally? Try less verbosing in apache, that<br />
&gt;&gt;&gt;&gt;&gt;&gt; is<br />
&gt;&gt;&gt;&gt;&gt;&gt; pretty intensive, but as you can benchmark a static file well (with<br />
&gt;&gt;&gt;&gt;&gt;&gt; moderate high settings), i assume it is some configuration problem<br />
&gt;&gt;&gt;&gt;&gt;&gt; in<br />
&gt;&gt;&gt;&gt;&gt;&gt; drupal.<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; Greeting.<br />
&gt;&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; Hi,<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; I can visit the site normaly, but with 2-3 concurrent ab test it<br />
&gt;&gt;&gt;&gt;&gt; fails.<br />
&gt;&gt;&gt;&gt;&gt; seen from 'ps' and 'htop' it seems that both apache and mysql<br />
&gt;&gt;&gt;&gt;&gt; continues<br />
&gt;&gt;&gt;&gt;&gt; to<br />
&gt;&gt;&gt;&gt;&gt; run normaly but it doesnt respond.<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; If i run netstat -an after the test it shows this :<br />
&gt;&gt;&gt;&gt;&gt; Active Internet connections (servers and established)<br />
&gt;&gt;&gt;&gt;&gt; Proto Recv-Q Send-Q Local Address Â  Â  Â  Â  Â  Foreign Address<br />
&gt;&gt;&gt;&gt;&gt; Â State<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 0.0.0.0:22 Â  Â  Â  Â  Â  Â  Â 0.0.0.0:*<br />
&gt;&gt;&gt;&gt;&gt; Â  Â  Â  Â LISTEN<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 127.0.0.1:25 Â  Â  Â  Â  Â  Â 0.0.0.0:* Â <br />
&gt;&gt;&gt;&gt;&gt; Â  Â  Â LISTEN<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 127.0.0.1:3306 Â  Â  Â  Â  Â 0.0.0.0:* Â <br />
&gt;&gt;&gt;&gt;&gt; Â  Â  Â LISTEN<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 0.0.0.0:80 Â  Â  Â  Â  Â  Â  Â 0.0.0.0:*<br />
&gt;&gt;&gt;&gt;&gt; Â  Â  Â  Â LISTEN<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 1 Â  Â  Â 0 x.x.x.x:80 Â  Â  Â  Â x.x.x.x:39237 Â <br />
&gt;&gt;&gt;&gt;&gt; CLOSE_WAIT<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 1 Â  Â  Â 0 x.x.x.x:80 Â  Â  Â  Â x.x.x.x:39236 Â <br />
&gt;&gt;&gt;&gt;&gt; Â CLOSE_WAIT<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 x.x.x.x:22 Â  Â  Â  Â x.x.x.x:47383 Â <br />
&gt;&gt;&gt;&gt;&gt; Â ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 127.0.0.1:80 Â  Â  Â  Â  Â <br />
&gt;&gt;&gt;&gt;&gt; Â 127.0.0.1:34775<br />
&gt;&gt;&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 1 Â  Â  Â 0 x.x.x.x:80 Â  Â  Â  Â x.x.x.x:39300 Â <br />
&gt;&gt;&gt;&gt;&gt; Â CLOSE_WAIT<br />
&gt;&gt;&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 127.0.0.1:34775 Â  Â  Â  Â  127.0.0.1:80<br />
&gt;&gt;&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 x.x.x.x:80 Â  Â  Â  Â x.x.x.x:39330 Â <br />
&gt;&gt;&gt;&gt;&gt; Â ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt; tcp6 Â  Â  Â  0 Â  Â  Â 0 :::22 Â  Â  Â  Â  Â  Â  Â  Â  Â  :::*<br />
&gt;&gt;&gt;&gt;&gt; LISTEN<br />
&gt;&gt;&gt;&gt;&gt; tcp6 Â  Â  Â  0 Â  Â  Â 0 ::1:25 Â  Â  Â  Â  Â  Â  Â  Â  Â :::*<br />
&gt;&gt;&gt;&gt;&gt; LISTEN<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; So it does seem like there should be room for new tcp connections?<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; But if I restart apache then it works again... So I guess it is a<br />
&gt;&gt;&gt;&gt;&gt; apache/php configuration issue?<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt; Med venlig hilsen / Best Regards<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; LFWeb<br />
&gt;&gt;&gt;&gt;&gt; Lars Nielsen<br />
&gt;&gt;&gt;&gt;&gt; Thorsensvej 30<br />
&gt;&gt;&gt;&gt;&gt; 4800 NykÃ¸bing Falster<br />
&gt;&gt;&gt;&gt;&gt; Tlf: +45 20 64 85 76<br />
&gt;&gt;&gt;&gt;&gt; email : <a href="mailto:&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;">&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;</a><br />
&gt;&gt;&gt;&gt;&gt; www : <a href="http://www.lfweb.dk" target="_blank"  rel="nofollow">http://www.lfweb.dk</a><br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; Have you tried benchmarking a really simple php page, such as<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; &lt;?php echo 'hello world'; ?&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; ?<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; It that works, than it is definitely an issue in Drupal's<br />
&gt;&gt;&gt;&gt; configuration<br />
&gt;&gt;&gt;&gt; and not in PHP/Apache. Additionally, you could check what happens when<br />
&gt;&gt;&gt;&gt; you<br />
&gt;&gt;&gt;&gt; try to establish a session or make a database call to rule out those<br />
&gt;&gt;&gt;&gt; as<br />
&gt;&gt;&gt;&gt; well, just make really simple tests that you know wouldn't fail and<br />
&gt;&gt;&gt;&gt; run ab<br />
&gt;&gt;&gt;&gt; on them.<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; Greetings.<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt; Thanks!<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; Now I have made<br />
&gt;&gt;&gt; &lt;?php<br />
&gt;&gt;&gt; Â echo &quot;Hey from PHP!&quot;;<br />
&gt;&gt;&gt; ?&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; It runs fine from a little concurrency. But with &quot;-c 5 -n 500&quot; it fails<br />
&gt;&gt;&gt; after 308 requests!<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; Best Regards / Med venlig hilsen<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; LFWeb<br />
&gt;&gt;&gt; Lars Nielsen<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; --<br />
&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; Have you tried benchmarking from localhost? Do you have any active<br />
&gt;&gt; firewall? Selinux? Shorewall? Anything that could block a ddos attack?<br />
&gt;&gt;<br />
&gt;<br />
&gt; A firewall is not the case here. He's testing with -c 2 and is getting<br />
&gt; errors, with -c 50 on a static file not. Also, blocking a DDOS attack<br />
&gt; at only 50 connections is way too low, so I don't think that would<br />
&gt; happen.<br />
&gt;<br />
&gt; - Matijn<br />
&gt;<br />
Now i have the result of a test on localhost:<br />
<br />
<br />
ab -c 1 -n 20 <a href="http://localhost/" target="_blank"  rel="nofollow">http://localhost/</a><br />
This is ApacheBench, Version 2.3 &lt;$Revision: 655654 $&gt;<br />
Copyright 1996 Adam Twiss, Zeus Technology Ltd, <a href="http://www.zeustech.net/" target="_blank"  rel="nofollow">http://www.zeustech.net/</a><br />
Licensed to The Apache Software Foundation, <a href="http://www.apache.org/" target="_blank"  rel="nofollow">http://www.apache.org/</a><br />
<br />
Benchmarking localhost (be patient).....done<br />
<br />
<br />
Server Software:        Apache/2.2.22<br />
Server Hostname:        localhost<br />
Server Port:            80<br />
<br />
Document Path:          /<br />
Document Length:        14463 bytes<br />
<br />
Concurrency Level:      1<br />
Time taken for tests:   3.540 seconds<br />
Complete requests:      20<br />
Failed requests:        0<br />
Write errors:           0<br />
Total transferred:      298480 bytes<br />
HTML transferred:       289260 bytes<br />
Requests per second:    5.65 [#/sec] (mean)<br />
Time per request:       177.020 [ms] (mean)<br />
Time per request:       177.020 [ms] (mean, across all concurrent requests)<br />
Transfer rate:          82.33 [Kbytes/sec] received<br />
<br />
Connection Times (ms)<br />
              min  mean[+/-sd] median   max<br />
Connect:        0    0   0.0      0       0<br />
Processing:   175  177   2.1    176     182<br />
Waiting:      153  156   1.7    155     160<br />
Total:        175  177   2.1    176     182<br />
<br />
Percentage of the requests served within a certain time (ms)<br />
  50%    176<br />
  66%    177<br />
  75%    177<br />
  80%    178<br />
  90%    182<br />
  95%    182<br />
  98%    182<br />
  99%    182<br />
 100%    182 (longest request)<br />
<br />
xx@grafikom:/home/xx# ab -c 2 -n 20 <a href="http://localhost/" target="_blank"  rel="nofollow">http://localhost/</a><br />
This is ApacheBench, Version 2.3 &lt;$Revision: 655654 $&gt;<br />
Copyright 1996 Adam Twiss, Zeus Technology Ltd, <a href="http://www.zeustech.net/" target="_blank"  rel="nofollow">http://www.zeustech.net/</a><br />
Licensed to The Apache Software Foundation, <a href="http://www.apache.org/" target="_blank"  rel="nofollow">http://www.apache.org/</a><br />
<br />
Benchmarking localhost (be patient)...apr_poll: The timeout specified has<br />
expired (70007)<br />
Total of 3 requests completed<br />
<br />
<br />
Does this give any meaning?<br />
<br />
<br />
Med venlig hilsen<br />
<br />
LFWeb<br />
Lars Nielsen<br />
<br />
<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Lars Nielsen</dc:creator>
            <category>php-general</category>
            <pubDate>Tue, 15 May 2012 11:50:01 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,493500,494454#msg-494454</guid>
            <title>Re: [PHP] Performance / AB issue?</title>
            <link>http://www.serverphorums.com/read.php?8,493500,494454#msg-494454</link>
            <description><![CDATA[ &gt; On Fri, May 11, 2012 at 9:53 AM, Camilo Sperberg &lt;unreal4u@gmail.com&gt;<br />
&gt; wrote:<br />
&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; Sent from my iPhone 5 Beta [Confidential use only]<br />
&gt;&gt;<br />
&gt;&gt; On 11 mei 2012, at 07:09, &quot;Lars Nielsen&quot; &lt;lars@lfweb.dk&gt; wrote:<br />
&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; On 10 mei 2012, at 23:26, Lars Nielsen wrote:<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; Sent from my iPhone 5 Beta [Confidential use only]<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; On 10 mei 2012, at 17:40, Matijn Woudt &lt;tijnema@gmail.com&gt; wrote:<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen &lt;lars@lfweb.dk&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; wrote:<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi there,<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I have apache-2.22/php 5.3.10 set up on a dedicated server but I<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; have<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; a<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; strange issue.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I have made a Drupal 7 site with a mysql db.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 1 -n 150 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a><br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; it<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; works<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; fine.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 2 -n 20 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; kills<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; apache.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 50 -n 1500<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://sitename/static.html" target="_blank"  rel="nofollow">http://sitename/static.html</a> it works fine.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I have set apache's errorlog to debug. But it writes nothing,<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; either<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; in<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; the virtualhost or in the server-file.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Can anyone give a hint about what can be wrong?<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; What do you mean with 'kills apache', does it terminate apache or<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; does<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; apache hang (eg. 100% cpu), and respond normal after the stress<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; test<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; is over?<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; And what is the index of your site? A php script, or..? Do you have<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; ModRewrite redirects etc?<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; - Matijn<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; Can you visit the site normally? Try less verbosing in apache, that<br />
&gt;&gt;&gt;&gt;&gt;&gt; is<br />
&gt;&gt;&gt;&gt;&gt;&gt; pretty intensive, but as you can benchmark a static file well (with<br />
&gt;&gt;&gt;&gt;&gt;&gt; moderate high settings), i assume it is some configuration problem<br />
&gt;&gt;&gt;&gt;&gt;&gt; in<br />
&gt;&gt;&gt;&gt;&gt;&gt; drupal.<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; Greeting.<br />
&gt;&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; Hi,<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; I can visit the site normaly, but with 2-3 concurrent ab test it<br />
&gt;&gt;&gt;&gt;&gt; fails.<br />
&gt;&gt;&gt;&gt;&gt; seen from 'ps' and 'htop' it seems that both apache and mysql<br />
&gt;&gt;&gt;&gt;&gt; continues<br />
&gt;&gt;&gt;&gt;&gt; to<br />
&gt;&gt;&gt;&gt;&gt; run normaly but it doesnt respond.<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; If i run netstat -an after the test it shows this :<br />
&gt;&gt;&gt;&gt;&gt; Active Internet connections (servers and established)<br />
&gt;&gt;&gt;&gt;&gt; Proto Recv-Q Send-Q Local Address Â  Â  Â  Â  Â  Foreign Address<br />
&gt;&gt;&gt;&gt;&gt; Â State<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 0.0.0.0:22 Â  Â  Â  Â  Â  Â  Â 0.0.0.0:*<br />
&gt;&gt;&gt;&gt;&gt; Â  Â  Â  Â LISTEN<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 127.0.0.1:25 Â  Â  Â  Â  Â  Â 0.0.0.0:* Â <br />
&gt;&gt;&gt;&gt;&gt; Â  Â  Â LISTEN<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 127.0.0.1:3306 Â  Â  Â  Â  Â 0.0.0.0:* Â <br />
&gt;&gt;&gt;&gt;&gt; Â  Â  Â LISTEN<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 0.0.0.0:80 Â  Â  Â  Â  Â  Â  Â 0.0.0.0:*<br />
&gt;&gt;&gt;&gt;&gt; Â  Â  Â  Â LISTEN<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 1 Â  Â  Â 0 x.x.x.x:80 Â  Â  Â  Â x.x.x.x:39237 Â <br />
&gt;&gt;&gt;&gt;&gt; CLOSE_WAIT<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 1 Â  Â  Â 0 x.x.x.x:80 Â  Â  Â  Â x.x.x.x:39236 Â <br />
&gt;&gt;&gt;&gt;&gt; Â CLOSE_WAIT<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 x.x.x.x:22 Â  Â  Â  Â x.x.x.x:47383 Â <br />
&gt;&gt;&gt;&gt;&gt; Â ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 127.0.0.1:80 Â  Â  Â  Â  Â <br />
&gt;&gt;&gt;&gt;&gt; Â 127.0.0.1:34775<br />
&gt;&gt;&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 1 Â  Â  Â 0 x.x.x.x:80 Â  Â  Â  Â x.x.x.x:39300 Â <br />
&gt;&gt;&gt;&gt;&gt; Â CLOSE_WAIT<br />
&gt;&gt;&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 127.0.0.1:34775 Â  Â  Â  Â  127.0.0.1:80<br />
&gt;&gt;&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt; tcp Â  Â  Â  Â 0 Â  Â  Â 0 x.x.x.x:80 Â  Â  Â  Â x.x.x.x:39330 Â <br />
&gt;&gt;&gt;&gt;&gt; Â ESTABLISHED<br />
&gt;&gt;&gt;&gt;&gt; tcp6 Â  Â  Â  0 Â  Â  Â 0 :::22 Â  Â  Â  Â  Â  Â  Â  Â  Â  :::*<br />
&gt;&gt;&gt;&gt;&gt; LISTEN<br />
&gt;&gt;&gt;&gt;&gt; tcp6 Â  Â  Â  0 Â  Â  Â 0 ::1:25 Â  Â  Â  Â  Â  Â  Â  Â  Â :::*<br />
&gt;&gt;&gt;&gt;&gt; LISTEN<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; So it does seem like there should be room for new tcp connections?<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; But if I restart apache then it works again... So I guess it is a<br />
&gt;&gt;&gt;&gt;&gt; apache/php configuration issue?<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt; Med venlig hilsen / Best Regards<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; LFWeb<br />
&gt;&gt;&gt;&gt;&gt; Lars Nielsen<br />
&gt;&gt;&gt;&gt;&gt; Thorsensvej 30<br />
&gt;&gt;&gt;&gt;&gt; 4800 NykÃ¸bing Falster<br />
&gt;&gt;&gt;&gt;&gt; Tlf: +45 20 64 85 76<br />
&gt;&gt;&gt;&gt;&gt; email : <a href="mailto:&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;">&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;</a><br />
&gt;&gt;&gt;&gt;&gt; www : <a href="http://www.lfweb.dk" target="_blank"  rel="nofollow">http://www.lfweb.dk</a><br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; Have you tried benchmarking a really simple php page, such as<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; &lt;?php echo 'hello world'; ?&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; ?<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; It that works, than it is definitely an issue in Drupal's<br />
&gt;&gt;&gt;&gt; configuration<br />
&gt;&gt;&gt;&gt; and not in PHP/Apache. Additionally, you could check what happens when<br />
&gt;&gt;&gt;&gt; you<br />
&gt;&gt;&gt;&gt; try to establish a session or make a database call to rule out those<br />
&gt;&gt;&gt;&gt; as<br />
&gt;&gt;&gt;&gt; well, just make really simple tests that you know wouldn't fail and<br />
&gt;&gt;&gt;&gt; run ab<br />
&gt;&gt;&gt;&gt; on them.<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; Greetings.<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt; Thanks!<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; Now I have made<br />
&gt;&gt;&gt; &lt;?php<br />
&gt;&gt;&gt; Â echo &quot;Hey from PHP!&quot;;<br />
&gt;&gt;&gt; ?&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; It runs fine from a little concurrency. But with &quot;-c 5 -n 500&quot; it fails<br />
&gt;&gt;&gt; after 308 requests!<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; Best Regards / Med venlig hilsen<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; LFWeb<br />
&gt;&gt;&gt; Lars Nielsen<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; --<br />
&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; Have you tried benchmarking from localhost? Do you have any active<br />
&gt;&gt; firewall? Selinux? Shorewall? Anything that could block a ddos attack?<br />
&gt;&gt;<br />
&gt;<br />
&gt; A firewall is not the case here. He's testing with -c 2 and is getting<br />
&gt; errors, with -c 50 on a static file not. Also, blocking a DDOS attack<br />
&gt; at only 50 connections is way too low, so I don't think that would<br />
&gt; happen.<br />
&gt;<br />
&gt; - Matijn<br />
&gt;<br />
&gt; --<br />
&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;<br />
&gt;<br />
<br />
Php is running as mod_php under an apache worker configuration.<br />
<br />
Med venlig hilsen<br />
<br />
LFWeb<br />
Lars Nielsen<br />
<br />
<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Lars Nielsen</dc:creator>
            <category>php-general</category>
            <pubDate>Fri, 11 May 2012 12:40:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,493500,494440#msg-494440</guid>
            <title>Re: [PHP] Performance / AB issue?</title>
            <link>http://www.serverphorums.com/read.php?8,493500,494440#msg-494440</link>
            <description><![CDATA[ How is PHP running, fast-cgi, sapi, etc..?<br />
<br />
Is there anything in the error_log for apache? Could be an issue with prefork/worker.<br />
<br />
Thanks,<br />
<br />
Mike Mackintosh<br />
PHP, the drug of choice - www.highonphp.com<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Mike Mackintosh</dc:creator>
            <category>php-general</category>
            <pubDate>Fri, 11 May 2012 12:00:04 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,493500,494428#msg-494428</guid>
            <title>Re: [PHP] Performance / AB issue?</title>
            <link>http://www.serverphorums.com/read.php?8,493500,494428#msg-494428</link>
            <description><![CDATA[ On Fri, May 11, 2012 at 9:53 AM, Camilo Sperberg &lt;unreal4u@gmail.com&gt; wrote:<br />
&gt;<br />
&gt;<br />
&gt; Sent from my iPhone 5 Beta [Confidential use only]<br />
&gt;<br />
&gt; On 11 mei 2012, at 07:09, &quot;Lars Nielsen&quot; &lt;lars@lfweb.dk&gt; wrote:<br />
&gt;<br />
&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; On 10 mei 2012, at 23:26, Lars Nielsen wrote:<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; Sent from my iPhone 5 Beta [Confidential use only]<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; On 10 mei 2012, at 17:40, Matijn Woudt &lt;tijnema@gmail.com&gt; wrote:<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen &lt;lars@lfweb.dk&gt; wrote:<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi there,<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; I have apache-2.22/php 5.3.10 set up on a dedicated server but I have<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; a<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; strange issue.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; I have made a Drupal 7 site with a mysql db.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 1 -n 150 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; works<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; fine.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 2 -n 20 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; kills<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; apache.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 50 -n 1500<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://sitename/static.html" target="_blank"  rel="nofollow">http://sitename/static.html</a> it works fine.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; I have set apache's errorlog to debug. But it writes nothing, either<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; in<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; the virtualhost or in the server-file.<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Can anyone give a hint about what can be wrong?<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; What do you mean with 'kills apache', does it terminate apache or does<br />
&gt;&gt;&gt;&gt;&gt;&gt; apache hang (eg. 100% cpu), and respond normal after the stress test<br />
&gt;&gt;&gt;&gt;&gt;&gt; is over?<br />
&gt;&gt;&gt;&gt;&gt;&gt; And what is the index of your site? A php script, or..? Do you have<br />
&gt;&gt;&gt;&gt;&gt;&gt; ModRewrite redirects etc?<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; - Matijn<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; Can you visit the site normally? Try less verbosing in apache, that is<br />
&gt;&gt;&gt;&gt;&gt; pretty intensive, but as you can benchmark a static file well (with<br />
&gt;&gt;&gt;&gt;&gt; moderate high settings), i assume it is some configuration problem in<br />
&gt;&gt;&gt;&gt;&gt; drupal.<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; Greeting.<br />
&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; Hi,<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; I can visit the site normaly, but with 2-3 concurrent ab test it fails..<br />
&gt;&gt;&gt;&gt; seen from 'ps' and 'htop' it seems that both apache and mysql continues<br />
&gt;&gt;&gt;&gt; to<br />
&gt;&gt;&gt;&gt; run normaly but it doesnt respond.<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; If i run netstat -an after the test it shows this :<br />
&gt;&gt;&gt;&gt; Active Internet connections (servers and established)<br />
&gt;&gt;&gt;&gt; Proto Recv-Q Send-Q Local Address           Foreign Address  State<br />
&gt;&gt;&gt;&gt; tcp        0      0 0.0.0.0:22              0.0.0.0:*        LISTEN<br />
&gt;&gt;&gt;&gt; tcp        0      0 127.0.0.1:25            0.0.0.0:*        LISTEN<br />
&gt;&gt;&gt;&gt; tcp        0      0 127.0.0.1:3306          0.0.0.0:*        LISTEN<br />
&gt;&gt;&gt;&gt; tcp        0      0 0.0.0.0:80              0.0.0.0:*        LISTEN<br />
&gt;&gt;&gt;&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39237   CLOSE_WAIT<br />
&gt;&gt;&gt;&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39236    CLOSE_WAIT<br />
&gt;&gt;&gt;&gt; tcp        0      0 x.x.x.x:22        x.x.x.x:47383    ESTABLISHED<br />
&gt;&gt;&gt;&gt; tcp        0      0 127.0.0.1:80            127.0.0.1:34775<br />
&gt;&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt;&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39300    CLOSE_WAIT<br />
&gt;&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt;&gt; tcp        0      0 127.0.0.1:34775         127.0.0.1:80<br />
&gt;&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt;&gt; tcp        0      0 x.x.x.x:80        x.x.x.x:39330    ESTABLISHED<br />
&gt;&gt;&gt;&gt; tcp6       0      0 :::22                   :::*<br />
&gt;&gt;&gt;&gt; LISTEN<br />
&gt;&gt;&gt;&gt; tcp6       0      0 ::1:25                  :::*<br />
&gt;&gt;&gt;&gt; LISTEN<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; So it does seem like there should be room for new tcp connections?<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; But if I restart apache then it works again... So I guess it is a<br />
&gt;&gt;&gt;&gt; apache/php configuration issue?<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt; Med venlig hilsen / Best Regards<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; LFWeb<br />
&gt;&gt;&gt;&gt; Lars Nielsen<br />
&gt;&gt;&gt;&gt; Thorsensvej 30<br />
&gt;&gt;&gt;&gt; 4800 Nykøbing Falster<br />
&gt;&gt;&gt;&gt; Tlf: +45 20 64 85 76<br />
&gt;&gt;&gt;&gt; email : <a href="mailto:&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;">&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;</a><br />
&gt;&gt;&gt;&gt; www : <a href="http://www.lfweb.dk" target="_blank"  rel="nofollow">http://www.lfweb.dk</a><br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; Have you tried benchmarking a really simple php page, such as<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; &lt;?php echo 'hello world'; ?&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; ?<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; It that works, than it is definitely an issue in Drupal's configuration<br />
&gt;&gt;&gt; and not in PHP/Apache. Additionally, you could check what happens when you<br />
&gt;&gt;&gt; try to establish a session or make a database call to rule out those as<br />
&gt;&gt;&gt; well, just make really simple tests that you know wouldn't fail and run ab<br />
&gt;&gt;&gt; on them.<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; Greetings.<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; --<br />
&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt; Thanks!<br />
&gt;&gt;<br />
&gt;&gt; Now I have made<br />
&gt;&gt; &lt;?php<br />
&gt;&gt;  echo &quot;Hey from PHP!&quot;;<br />
&gt;&gt; ?&gt;<br />
&gt;&gt;<br />
&gt;&gt; It runs fine from a little concurrency. But with &quot;-c 5 -n 500&quot; it fails<br />
&gt;&gt; after 308 requests!<br />
&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; Best Regards / Med venlig hilsen<br />
&gt;&gt;<br />
&gt;&gt; LFWeb<br />
&gt;&gt; Lars Nielsen<br />
&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; --<br />
&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;<br />
&gt;<br />
&gt; Have you tried benchmarking from localhost? Do you have any active firewall? Selinux? Shorewall? Anything that could block a ddos attack?<br />
&gt;<br />
<br />
A firewall is not the case here. He's testing with -c 2 and is getting<br />
errors, with -c 50 on a static file not. Also, blocking a DDOS attack<br />
at only 50 connections is way too low, so I don't think that would<br />
happen.<br />
<br />
- Matijn<br />
<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Matijn Woudt</dc:creator>
            <category>php-general</category>
            <pubDate>Fri, 11 May 2012 11:50:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,493500,494376#msg-494376</guid>
            <title>Re: [PHP] Performance / AB issue?</title>
            <link>http://www.serverphorums.com/read.php?8,493500,494376#msg-494376</link>
            <description><![CDATA[ Sent from my iPhone 5 Beta [Confidential use only]<br />
<br />
On 11 mei 2012, at 07:09, &quot;Lars Nielsen&quot; &lt;lars@lfweb.dk&gt; wrote:<br />
<br />
&gt; <br />
&gt;&gt; <br />
&gt;&gt; On 10 mei 2012, at 23:26, Lars Nielsen wrote:<br />
&gt;&gt; <br />
&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; Sent from my iPhone 5 Beta [Confidential use only]<br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; On 10 mei 2012, at 17:40, Matijn Woudt &lt;tijnema@gmail.com&gt; wrote:<br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt;&gt; On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen &lt;lars@lfweb.dk&gt; wrote:<br />
&gt;&gt;&gt;&gt;&gt;&gt; Hi there,<br />
&gt;&gt;&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt;&gt;&gt; I have apache-2.22/php 5.3.10 set up on a dedicated server but I have<br />
&gt;&gt;&gt;&gt;&gt;&gt; a<br />
&gt;&gt;&gt;&gt;&gt;&gt; strange issue.<br />
&gt;&gt;&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt;&gt;&gt; I have made a Drupal 7 site with a mysql db.<br />
&gt;&gt;&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 1 -n 150 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt;&gt;&gt;&gt; works<br />
&gt;&gt;&gt;&gt;&gt;&gt; fine.<br />
&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 2 -n 20 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt;&gt;&gt;&gt; kills<br />
&gt;&gt;&gt;&gt;&gt;&gt; apache.<br />
&gt;&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 50 -n 1500<br />
&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://sitename/static.html" target="_blank"  rel="nofollow">http://sitename/static.html</a> it works fine.<br />
&gt;&gt;&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt;&gt;&gt; I have set apache's errorlog to debug. But it writes nothing, either<br />
&gt;&gt;&gt;&gt;&gt;&gt; in<br />
&gt;&gt;&gt;&gt;&gt;&gt; the virtualhost or in the server-file.<br />
&gt;&gt;&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt;&gt;&gt; Can anyone give a hint about what can be wrong?<br />
&gt;&gt;&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt;&gt; What do you mean with 'kills apache', does it terminate apache or does<br />
&gt;&gt;&gt;&gt;&gt; apache hang (eg. 100% cpu), and respond normal after the stress test<br />
&gt;&gt;&gt;&gt;&gt; is over?<br />
&gt;&gt;&gt;&gt;&gt; And what is the index of your site? A php script, or..? Do you have<br />
&gt;&gt;&gt;&gt;&gt; ModRewrite redirects etc?<br />
&gt;&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt;&gt; - Matijn<br />
&gt;&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; Can you visit the site normally? Try less verbosing in apache, that is<br />
&gt;&gt;&gt;&gt; pretty intensive, but as you can benchmark a static file well (with<br />
&gt;&gt;&gt;&gt; moderate high settings), i assume it is some configuration problem in<br />
&gt;&gt;&gt;&gt; drupal.<br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; Greeting.<br />
&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt; <br />
&gt;&gt;&gt; Hi,<br />
&gt;&gt;&gt; <br />
&gt;&gt;&gt; I can visit the site normaly, but with 2-3 concurrent ab test it fails.<br />
&gt;&gt;&gt; seen from 'ps' and 'htop' it seems that both apache and mysql continues<br />
&gt;&gt;&gt; to<br />
&gt;&gt;&gt; run normaly but it doesnt respond.<br />
&gt;&gt;&gt; <br />
&gt;&gt;&gt; If i run netstat -an after the test it shows this :<br />
&gt;&gt;&gt; Active Internet connections (servers and established)<br />
&gt;&gt;&gt; Proto Recv-Q Send-Q Local Address           Foreign Address  State<br />
&gt;&gt;&gt; tcp        0      0 0.0.0.0:22              0.0.0.0:*        LISTEN<br />
&gt;&gt;&gt; tcp        0      0 127.0.0.1:25            0.0.0.0:*        LISTEN<br />
&gt;&gt;&gt; tcp        0      0 127.0.0.1:3306          0.0.0.0:*        LISTEN<br />
&gt;&gt;&gt; tcp        0      0 0.0.0.0:80              0.0.0.0:*        LISTEN<br />
&gt;&gt;&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39237   CLOSE_WAIT<br />
&gt;&gt;&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39236    CLOSE_WAIT<br />
&gt;&gt;&gt; tcp        0      0 x.x.x.x:22        x.x.x.x:47383    ESTABLISHED<br />
&gt;&gt;&gt; tcp        0      0 127.0.0.1:80            127.0.0.1:34775<br />
&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39300    CLOSE_WAIT<br />
&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt; tcp        0      0 127.0.0.1:34775         127.0.0.1:80<br />
&gt;&gt;&gt; ESTABLISHED<br />
&gt;&gt;&gt; tcp        0      0 x.x.x.x:80        x.x.x.x:39330    ESTABLISHED<br />
&gt;&gt;&gt; tcp6       0      0 :::22                   :::*<br />
&gt;&gt;&gt; LISTEN<br />
&gt;&gt;&gt; tcp6       0      0 ::1:25                  :::*<br />
&gt;&gt;&gt; LISTEN<br />
&gt;&gt;&gt; <br />
&gt;&gt;&gt; So it does seem like there should be room for new tcp connections?<br />
&gt;&gt;&gt; <br />
&gt;&gt;&gt; But if I restart apache then it works again... So I guess it is a<br />
&gt;&gt;&gt; apache/php configuration issue?<br />
&gt;&gt;&gt; <br />
&gt;&gt;&gt; --<br />
&gt;&gt;&gt; Med venlig hilsen / Best Regards<br />
&gt;&gt;&gt; <br />
&gt;&gt;&gt; LFWeb<br />
&gt;&gt;&gt; Lars Nielsen<br />
&gt;&gt;&gt; Thorsensvej 30<br />
&gt;&gt;&gt; 4800 Nykøbing Falster<br />
&gt;&gt;&gt; Tlf: +45 20 64 85 76<br />
&gt;&gt;&gt; email : <a href="mailto:&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;">&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;</a><br />
&gt;&gt;&gt; www : <a href="http://www.lfweb.dk" target="_blank"  rel="nofollow">http://www.lfweb.dk</a><br />
&gt;&gt;&gt; <br />
&gt;&gt;&gt; <br />
&gt;&gt;&gt; --<br />
&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt; <br />
&gt;&gt; <br />
&gt;&gt; Have you tried benchmarking a really simple php page, such as<br />
&gt;&gt; <br />
&gt;&gt; &lt;?php echo 'hello world'; ?&gt;<br />
&gt;&gt; <br />
&gt;&gt; ?<br />
&gt;&gt; <br />
&gt;&gt; It that works, than it is definitely an issue in Drupal's configuration<br />
&gt;&gt; and not in PHP/Apache. Additionally, you could check what happens when you<br />
&gt;&gt; try to establish a session or make a database call to rule out those as<br />
&gt;&gt; well, just make really simple tests that you know wouldn't fail and run ab<br />
&gt;&gt; on them.<br />
&gt;&gt; <br />
&gt;&gt; Greetings.<br />
&gt;&gt; <br />
&gt;&gt; <br />
&gt;&gt; --<br />
&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt; <br />
&gt;&gt; <br />
&gt; Thanks!<br />
&gt; <br />
&gt; Now I have made<br />
&gt; &lt;?php<br />
&gt;  echo &quot;Hey from PHP!&quot;;<br />
&gt; ?&gt;<br />
&gt; <br />
&gt; It runs fine from a little concurrency. But with &quot;-c 5 -n 500&quot; it fails<br />
&gt; after 308 requests!<br />
&gt; <br />
&gt; <br />
&gt; <br />
&gt; Best Regards / Med venlig hilsen<br />
&gt; <br />
&gt; LFWeb<br />
&gt; Lars Nielsen<br />
&gt; <br />
&gt; <br />
&gt; -- <br />
&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt; <br />
<br />
Have you tried benchmarking from localhost? Do you have any active firewall? Selinux? Shorewall? Anything that could block a ddos attack?<br />
<br />
Greetings. <br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Camilo Sperberg</dc:creator>
            <category>php-general</category>
            <pubDate>Fri, 11 May 2012 10:00:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,493500,494272#msg-494272</guid>
            <title>Re: [PHP] Performance / AB issue?</title>
            <link>http://www.serverphorums.com/read.php?8,493500,494272#msg-494272</link>
            <description><![CDATA[ &gt;<br />
&gt; On 10 mei 2012, at 23:26, Lars Nielsen wrote:<br />
&gt;<br />
&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; Sent from my iPhone 5 Beta [Confidential use only]<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; On 10 mei 2012, at 17:40, Matijn Woudt &lt;tijnema@gmail.com&gt; wrote:<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen &lt;lars@lfweb.dk&gt; wrote:<br />
&gt;&gt;&gt;&gt;&gt; Hi there,<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; I have apache-2.22/php 5.3.10 set up on a dedicated server but I have<br />
&gt;&gt;&gt;&gt;&gt; a<br />
&gt;&gt;&gt;&gt;&gt; strange issue.<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; I have made a Drupal 7 site with a mysql db.<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 1 -n 150 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt;&gt;&gt; works<br />
&gt;&gt;&gt;&gt;&gt; fine.<br />
&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 2 -n 20 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt;&gt;&gt; kills<br />
&gt;&gt;&gt;&gt;&gt; apache.<br />
&gt;&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 50 -n 1500<br />
&gt;&gt;&gt;&gt;&gt; <a href="http://sitename/static.html" target="_blank"  rel="nofollow">http://sitename/static.html</a> it works fine.<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; I have set apache's errorlog to debug. But it writes nothing, either<br />
&gt;&gt;&gt;&gt;&gt; in<br />
&gt;&gt;&gt;&gt;&gt; the virtualhost or in the server-file.<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; Can anyone give a hint about what can be wrong?<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; What do you mean with 'kills apache', does it terminate apache or does<br />
&gt;&gt;&gt;&gt; apache hang (eg. 100% cpu), and respond normal after the stress test<br />
&gt;&gt;&gt;&gt; is over?<br />
&gt;&gt;&gt;&gt; And what is the index of your site? A php script, or..? Do you have<br />
&gt;&gt;&gt;&gt; ModRewrite redirects etc?<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; - Matijn<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; --<br />
&gt;&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; Can you visit the site normally? Try less verbosing in apache, that is<br />
&gt;&gt;&gt; pretty intensive, but as you can benchmark a static file well (with<br />
&gt;&gt;&gt; moderate high settings), i assume it is some configuration problem in<br />
&gt;&gt;&gt; drupal.<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; Greeting.<br />
&gt;&gt;&gt; --<br />
&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; Hi,<br />
&gt;&gt;<br />
&gt;&gt; I can visit the site normaly, but with 2-3 concurrent ab test it fails.<br />
&gt;&gt; seen from 'ps' and 'htop' it seems that both apache and mysql continues<br />
&gt;&gt; to<br />
&gt;&gt; run normaly but it doesnt respond.<br />
&gt;&gt;<br />
&gt;&gt; If i run netstat -an after the test it shows this :<br />
&gt;&gt; Active Internet connections (servers and established)<br />
&gt;&gt; Proto Recv-Q Send-Q Local Address           Foreign Address  State<br />
&gt;&gt; tcp        0      0 0.0.0.0:22              0.0.0.0:*        LISTEN<br />
&gt;&gt; tcp        0      0 127.0.0.1:25            0.0.0.0:*        LISTEN<br />
&gt;&gt; tcp        0      0 127.0.0.1:3306          0.0.0.0:*        LISTEN<br />
&gt;&gt; tcp        0      0 0.0.0.0:80              0.0.0.0:*        LISTEN<br />
&gt;&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39237   CLOSE_WAIT<br />
&gt;&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39236    CLOSE_WAIT<br />
&gt;&gt; tcp        0      0 x.x.x.x:22        x.x.x.x:47383    ESTABLISHED<br />
&gt;&gt; tcp        0      0 127.0.0.1:80            127.0.0.1:34775<br />
&gt;&gt; ESTABLISHED<br />
&gt;&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39300    CLOSE_WAIT<br />
&gt;&gt; ESTABLISHED<br />
&gt;&gt; tcp        0      0 127.0.0.1:34775         127.0.0.1:80<br />
&gt;&gt; ESTABLISHED<br />
&gt;&gt; tcp        0      0 x.x.x.x:80        x.x.x.x:39330    ESTABLISHED<br />
&gt;&gt; tcp6       0      0 :::22                   :::*<br />
&gt;&gt; LISTEN<br />
&gt;&gt; tcp6       0      0 ::1:25                  :::*<br />
&gt;&gt; LISTEN<br />
&gt;&gt;<br />
&gt;&gt; So it does seem like there should be room for new tcp connections?<br />
&gt;&gt;<br />
&gt;&gt; But if I restart apache then it works again... So I guess it is a<br />
&gt;&gt; apache/php configuration issue?<br />
&gt;&gt;<br />
&gt;&gt; --<br />
&gt;&gt; Med venlig hilsen / Best Regards<br />
&gt;&gt;<br />
&gt;&gt; LFWeb<br />
&gt;&gt; Lars Nielsen<br />
&gt;&gt; Thorsensvej 30<br />
&gt;&gt; 4800 Nykøbing Falster<br />
&gt;&gt; Tlf: +45 20 64 85 76<br />
&gt;&gt; email : <a href="mailto:&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;">&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;</a><br />
&gt;&gt; www : <a href="http://www.lfweb.dk" target="_blank"  rel="nofollow">http://www.lfweb.dk</a><br />
&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; --<br />
&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;<br />
&gt;<br />
&gt; Have you tried benchmarking a really simple php page, such as<br />
&gt;<br />
&gt; &lt;?php echo 'hello world'; ?&gt;<br />
&gt;<br />
&gt; ?<br />
&gt;<br />
&gt; It that works, than it is definitely an issue in Drupal's configuration<br />
&gt; and not in PHP/Apache. Additionally, you could check what happens when you<br />
&gt; try to establish a session or make a database call to rule out those as<br />
&gt; well, just make really simple tests that you know wouldn't fail and run ab<br />
&gt; on them.<br />
&gt;<br />
&gt; Greetings.<br />
&gt;<br />
&gt;<br />
&gt; --<br />
&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;<br />
&gt;<br />
Thanks!<br />
<br />
Now I have made<br />
&lt;?php<br />
  echo &quot;Hey from PHP!&quot;;<br />
?&gt;<br />
<br />
It runs fine from a little concurrency. But with &quot;-c 5 -n 500&quot; it fails<br />
after 308 requests!<br />
<br />
<br />
<br />
Best Regards / Med venlig hilsen<br />
<br />
LFWeb<br />
Lars Nielsen<br />
<br />
<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Lars Nielsen</dc:creator>
            <category>php-general</category>
            <pubDate>Fri, 11 May 2012 07:20:06 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,493500,494144#msg-494144</guid>
            <title>Re: [PHP] Performance / AB issue?</title>
            <link>http://www.serverphorums.com/read.php?8,493500,494144#msg-494144</link>
            <description><![CDATA[ On 10 mei 2012, at 23:26, Lars Nielsen wrote:<br />
<br />
&gt; <br />
&gt;&gt; <br />
&gt;&gt; <br />
&gt;&gt; Sent from my iPhone 5 Beta [Confidential use only]<br />
&gt;&gt; <br />
&gt;&gt; On 10 mei 2012, at 17:40, Matijn Woudt &lt;tijnema@gmail.com&gt; wrote:<br />
&gt;&gt; <br />
&gt;&gt;&gt; On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen &lt;lars@lfweb.dk&gt; wrote:<br />
&gt;&gt;&gt;&gt; Hi there,<br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; I have apache-2.22/php 5.3.10 set up on a dedicated server but I have a<br />
&gt;&gt;&gt;&gt; strange issue.<br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; I have made a Drupal 7 site with a mysql db.<br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 1 -n 150 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt;&gt; works<br />
&gt;&gt;&gt;&gt; fine.<br />
&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 2 -n 20 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt;&gt; kills<br />
&gt;&gt;&gt;&gt; apache.<br />
&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 50 -n 1500<br />
&gt;&gt;&gt;&gt; <a href="http://sitename/static.html" target="_blank"  rel="nofollow">http://sitename/static.html</a> it works fine.<br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; I have set apache's errorlog to debug. But it writes nothing, either in<br />
&gt;&gt;&gt;&gt; the virtualhost or in the server-file.<br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; Can anyone give a hint about what can be wrong?<br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt;&gt; <br />
&gt;&gt;&gt; <br />
&gt;&gt;&gt; What do you mean with 'kills apache', does it terminate apache or does<br />
&gt;&gt;&gt; apache hang (eg. 100% cpu), and respond normal after the stress test<br />
&gt;&gt;&gt; is over?<br />
&gt;&gt;&gt; And what is the index of your site? A php script, or..? Do you have<br />
&gt;&gt;&gt; ModRewrite redirects etc?<br />
&gt;&gt;&gt; <br />
&gt;&gt;&gt; - Matijn<br />
&gt;&gt;&gt; <br />
&gt;&gt;&gt; --<br />
&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt; <br />
&gt;&gt; <br />
&gt;&gt; Can you visit the site normally? Try less verbosing in apache, that is<br />
&gt;&gt; pretty intensive, but as you can benchmark a static file well (with<br />
&gt;&gt; moderate high settings), i assume it is some configuration problem in<br />
&gt;&gt; drupal.<br />
&gt;&gt; <br />
&gt;&gt; Greeting.<br />
&gt;&gt; --<br />
&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt; <br />
&gt;&gt; <br />
&gt; <br />
&gt; Hi,<br />
&gt; <br />
&gt; I can visit the site normaly, but with 2-3 concurrent ab test it fails.<br />
&gt; seen from 'ps' and 'htop' it seems that both apache and mysql continues to<br />
&gt; run normaly but it doesnt respond.<br />
&gt; <br />
&gt; If i run netstat -an after the test it shows this :<br />
&gt; Active Internet connections (servers and established)<br />
&gt; Proto Recv-Q Send-Q Local Address           Foreign Address  State<br />
&gt; tcp        0      0 0.0.0.0:22              0.0.0.0:*        LISTEN<br />
&gt; tcp        0      0 127.0.0.1:25            0.0.0.0:*        LISTEN<br />
&gt; tcp        0      0 127.0.0.1:3306          0.0.0.0:*        LISTEN<br />
&gt; tcp        0      0 0.0.0.0:80              0.0.0.0:*        LISTEN<br />
&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39237   CLOSE_WAIT<br />
&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39236    CLOSE_WAIT<br />
&gt; tcp        0      0 x.x.x.x:22        x.x.x.x:47383    ESTABLISHED<br />
&gt; tcp        0      0 127.0.0.1:80            127.0.0.1:34775        <br />
&gt; ESTABLISHED<br />
&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39300    CLOSE_WAIT <br />
&gt; ESTABLISHED<br />
&gt; tcp        0      0 127.0.0.1:34775         127.0.0.1:80           <br />
&gt; ESTABLISHED<br />
&gt; tcp        0      0 x.x.x.x:80        x.x.x.x:39330    ESTABLISHED<br />
&gt; tcp6       0      0 :::22                   :::*                    LISTEN<br />
&gt; tcp6       0      0 ::1:25                  :::*                    LISTEN<br />
&gt; <br />
&gt; So it does seem like there should be room for new tcp connections?<br />
&gt; <br />
&gt; But if I restart apache then it works again... So I guess it is a<br />
&gt; apache/php configuration issue?<br />
&gt; <br />
&gt; -- <br />
&gt; Med venlig hilsen / Best Regards<br />
&gt; <br />
&gt; LFWeb<br />
&gt; Lars Nielsen<br />
&gt; Thorsensvej 30<br />
&gt; 4800 Nykøbing Falster<br />
&gt; Tlf: +45 20 64 85 76<br />
&gt; email : <a href="mailto:&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;">&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;</a><br />
&gt; www : <a href="http://www.lfweb.dk" target="_blank"  rel="nofollow">http://www.lfweb.dk</a><br />
&gt; <br />
&gt; <br />
&gt; -- <br />
&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt; <br />
<br />
Have you tried benchmarking a really simple php page, such as <br />
<br />
&lt;?php echo 'hello world'; ?&gt;<br />
<br />
?<br />
<br />
It that works, than it is definitely an issue in Drupal's configuration and not in PHP/Apache. Additionally, you could check what happens when you try to establish a session or make a database call to rule out those as well, just make really simple tests that you know wouldn't fail and run ab on them.<br />
<br />
Greetings.<br />
<br />
<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Camilo Sperberg</dc:creator>
            <category>php-general</category>
            <pubDate>Fri, 11 May 2012 01:30:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,493500,494115#msg-494115</guid>
            <title>Re: [PHP] Performance / AB issue?</title>
            <link>http://www.serverphorums.com/read.php?8,493500,494115#msg-494115</link>
            <description><![CDATA[ On Thu, May 10, 2012 at 11:26 PM, Lars Nielsen &lt;lars@lfweb.dk&gt; wrote:<br />
&gt;<br />
&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; Sent from my iPhone 5 Beta [Confidential use only]<br />
&gt;&gt;<br />
&gt;&gt; On 10 mei 2012, at 17:40, Matijn Woudt &lt;tijnema@gmail.com&gt; wrote:<br />
&gt;&gt;<br />
&gt;&gt;&gt; On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen &lt;lars@lfweb.dk&gt; wrote:<br />
&gt;&gt;&gt;&gt; Hi there,<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; I have apache-2.22/php 5.3.10 set up on a dedicated server but I have a<br />
&gt;&gt;&gt;&gt; strange issue.<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; I have made a Drupal 7 site with a mysql db.<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 1 -n 150 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt;&gt; works<br />
&gt;&gt;&gt;&gt; fine.<br />
&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 2 -n 20 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt;&gt; kills<br />
&gt;&gt;&gt;&gt; apache.<br />
&gt;&gt;&gt;&gt; If I stress-test the site with : ab -c 50 -n 1500<br />
&gt;&gt;&gt;&gt; <a href="http://sitename/static.html" target="_blank"  rel="nofollow">http://sitename/static.html</a> it works fine.<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; I have set apache's errorlog to debug. But it writes nothing, either in<br />
&gt;&gt;&gt;&gt; the virtualhost or in the server-file.<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt; Can anyone give a hint about what can be wrong?<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; What do you mean with 'kills apache', does it terminate apache or does<br />
&gt;&gt;&gt; apache hang (eg. 100% cpu), and respond normal after the stress test<br />
&gt;&gt;&gt; is over?<br />
&gt;&gt;&gt; And what is the index of your site? A php script, or..? Do you have<br />
&gt;&gt;&gt; ModRewrite redirects etc?<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; - Matijn<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; --<br />
&gt;&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; Can you visit the site normally? Try less verbosing in apache, that is<br />
&gt;&gt; pretty intensive, but as you can benchmark a static file well (with<br />
&gt;&gt; moderate high settings), i assume it is some configuration problem in<br />
&gt;&gt; drupal.<br />
&gt;&gt;<br />
&gt;&gt; Greeting.<br />
&gt;&gt; --<br />
&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;<br />
&gt;&gt;<br />
&gt;<br />
&gt; Hi,<br />
&gt;<br />
&gt; I can visit the site normaly, but with 2-3 concurrent ab test it fails.<br />
&gt; seen from 'ps' and 'htop' it seems that both apache and mysql continues to<br />
&gt; run normaly but it doesnt respond.<br />
&gt;<br />
<br />
That sounds like a deadlock or something.. It's also possible it is<br />
waiting for MySQL to respond and some deadlock might happen there<br />
<br />
&gt; If i run netstat -an after the test it shows this :<br />
&gt; Active Internet connections (servers and established)<br />
&gt; Proto Recv-Q Send-Q Local Address           Foreign Address  State<br />
&gt; tcp        0      0 0.0.0.0:22              0.0.0.0:*        LISTEN<br />
&gt; tcp        0      0 127.0.0.1:25            0.0.0.0:*        LISTEN<br />
&gt; tcp        0      0 127.0.0.1:3306          0.0.0.0:*        LISTEN<br />
&gt; tcp        0      0 0.0.0.0:80              0.0.0.0:*        LISTEN<br />
&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39237   CLOSE_WAIT<br />
&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39236    CLOSE_WAIT<br />
&gt; tcp        0      0 x.x.x.x:22        x.x.x.x:47383    ESTABLISHED<br />
&gt; tcp        0      0 127.0.0.1:80            127.0.0.1:34775<br />
&gt; ESTABLISHED<br />
&gt; tcp        1      0 x.x.x.x:80        x.x.x.x:39300    CLOSE_WAIT<br />
&gt; ESTABLISHED<br />
&gt; tcp        0      0 127.0.0.1:34775         127.0.0.1:80<br />
&gt; ESTABLISHED<br />
&gt; tcp        0      0 x.x.x.x:80        x.x.x.x:39330    ESTABLISHED<br />
&gt; tcp6       0      0 :::22                   :::*                    LISTEN<br />
&gt; tcp6       0      0 ::1:25                  :::*                    LISTEN<br />
&gt;<br />
&gt; So it does seem like there should be room for new tcp connections?<br />
<br />
even 10.000 connections at the same time should be fine<br />
<br />
&gt;<br />
&gt; But if I restart apache then it works again... So I guess it is a<br />
&gt; apache/php configuration issue?<br />
&gt;<br />
<br />
Did you try to run ab from the same server (with <a href="http://localhost/" target="_blank"  rel="nofollow">http://localhost/</a>) too?<br />
Also, are you running any optimization stuff, like memcached?<br />
<br />
- Matijn<br />
<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Matijn Woudt</dc:creator>
            <category>php-general</category>
            <pubDate>Fri, 11 May 2012 00:30:01 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,493500,494084#msg-494084</guid>
            <title>Re: [PHP] Performance / AB issue?</title>
            <link>http://www.serverphorums.com/read.php?8,493500,494084#msg-494084</link>
            <description><![CDATA[ &gt;<br />
&gt;<br />
&gt; Sent from my iPhone 5 Beta [Confidential use only]<br />
&gt;<br />
&gt; On 10 mei 2012, at 17:40, Matijn Woudt &lt;tijnema@gmail.com&gt; wrote:<br />
&gt;<br />
&gt;&gt; On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen &lt;lars@lfweb.dk&gt; wrote:<br />
&gt;&gt;&gt; Hi there,<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; I have apache-2.22/php 5.3.10 set up on a dedicated server but I have a<br />
&gt;&gt;&gt; strange issue.<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; I have made a Drupal 7 site with a mysql db.<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; If I stress-test the site with : ab -c 1 -n 150 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt; works<br />
&gt;&gt;&gt; fine.<br />
&gt;&gt;&gt; If I stress-test the site with : ab -c 2 -n 20 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it<br />
&gt;&gt;&gt; kills<br />
&gt;&gt;&gt; apache.<br />
&gt;&gt;&gt; If I stress-test the site with : ab -c 50 -n 1500<br />
&gt;&gt;&gt; <a href="http://sitename/static.html" target="_blank"  rel="nofollow">http://sitename/static.html</a> it works fine.<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; I have set apache's errorlog to debug. But it writes nothing, either in<br />
&gt;&gt;&gt; the virtualhost or in the server-file.<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; Can anyone give a hint about what can be wrong?<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; What do you mean with 'kills apache', does it terminate apache or does<br />
&gt;&gt; apache hang (eg. 100% cpu), and respond normal after the stress test<br />
&gt;&gt; is over?<br />
&gt;&gt; And what is the index of your site? A php script, or..? Do you have<br />
&gt;&gt; ModRewrite redirects etc?<br />
&gt;&gt;<br />
&gt;&gt; - Matijn<br />
&gt;&gt;<br />
&gt;&gt; --<br />
&gt;&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt;&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;&gt;<br />
&gt;<br />
&gt; Can you visit the site normally? Try less verbosing in apache, that is<br />
&gt; pretty intensive, but as you can benchmark a static file well (with<br />
&gt; moderate high settings), i assume it is some configuration problem in<br />
&gt; drupal.<br />
&gt;<br />
&gt; Greeting.<br />
&gt; --<br />
&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt;<br />
&gt;<br />
<br />
Hi,<br />
<br />
I can visit the site normaly, but with 2-3 concurrent ab test it fails.<br />
seen from 'ps' and 'htop' it seems that both apache and mysql continues to<br />
run normaly but it doesnt respond.<br />
<br />
If i run netstat -an after the test it shows this :<br />
Active Internet connections (servers and established)<br />
Proto Recv-Q Send-Q Local Address           Foreign Address  State<br />
tcp        0      0 0.0.0.0:22              0.0.0.0:*        LISTEN<br />
tcp        0      0 127.0.0.1:25            0.0.0.0:*        LISTEN<br />
tcp        0      0 127.0.0.1:3306          0.0.0.0:*        LISTEN<br />
tcp        0      0 0.0.0.0:80              0.0.0.0:*        LISTEN<br />
tcp        1      0 x.x.x.x:80        x.x.x.x:39237   CLOSE_WAIT<br />
tcp        1      0 x.x.x.x:80        x.x.x.x:39236    CLOSE_WAIT<br />
tcp        0      0 x.x.x.x:22        x.x.x.x:47383    ESTABLISHED<br />
tcp        0      0 127.0.0.1:80            127.0.0.1:34775        <br />
ESTABLISHED<br />
tcp        1      0 x.x.x.x:80        x.x.x.x:39300    CLOSE_WAIT <br />
ESTABLISHED<br />
tcp        0      0 127.0.0.1:34775         127.0.0.1:80           <br />
ESTABLISHED<br />
tcp        0      0 x.x.x.x:80        x.x.x.x:39330    ESTABLISHED<br />
tcp6       0      0 :::22                   :::*                    LISTEN<br />
tcp6       0      0 ::1:25                  :::*                    LISTEN<br />
<br />
So it does seem like there should be room for new tcp connections?<br />
<br />
But if I restart apache then it works again... So I guess it is a<br />
apache/php configuration issue?<br />
<br />
-- <br />
Med venlig hilsen / Best Regards<br />
<br />
LFWeb<br />
Lars Nielsen<br />
Thorsensvej 30<br />
4800 Nykøbing Falster<br />
Tlf: +45 20 64 85 76<br />
email : <a href="mailto:&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;">&#108;&#97;&#114;&#115;&#64;&#108;&#102;&#119;&#101;&#98;&#46;&#100;&#107;</a><br />
www : <a href="http://www.lfweb.dk" target="_blank"  rel="nofollow">http://www.lfweb.dk</a><br />
<br />
<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Lars Nielsen</dc:creator>
            <category>php-general</category>
            <pubDate>Thu, 10 May 2012 23:32:56 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,493500,493870#msg-493870</guid>
            <title>Re: [PHP] Performance / AB issue?</title>
            <link>http://www.serverphorums.com/read.php?8,493500,493870#msg-493870</link>
            <description><![CDATA[ Sent from my iPhone 5 Beta [Confidential use only]<br />
<br />
On 10 mei 2012, at 17:40, Matijn Woudt &lt;tijnema@gmail.com&gt; wrote:<br />
<br />
&gt; On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen &lt;lars@lfweb.dk&gt; wrote:<br />
&gt;&gt; Hi there,<br />
&gt;&gt; <br />
&gt;&gt; I have apache-2.22/php 5.3.10 set up on a dedicated server but I have a<br />
&gt;&gt; strange issue.<br />
&gt;&gt; <br />
&gt;&gt; I have made a Drupal 7 site with a mysql db.<br />
&gt;&gt; <br />
&gt;&gt; If I stress-test the site with : ab -c 1 -n 150 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it works<br />
&gt;&gt; fine.<br />
&gt;&gt; If I stress-test the site with : ab -c 2 -n 20 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it kills<br />
&gt;&gt; apache.<br />
&gt;&gt; If I stress-test the site with : ab -c 50 -n 1500<br />
&gt;&gt; <a href="http://sitename/static.html" target="_blank"  rel="nofollow">http://sitename/static.html</a> it works fine.<br />
&gt;&gt; <br />
&gt;&gt; I have set apache's errorlog to debug. But it writes nothing, either in<br />
&gt;&gt; the virtualhost or in the server-file.<br />
&gt;&gt; <br />
&gt;&gt; Can anyone give a hint about what can be wrong?<br />
&gt;&gt; <br />
&gt;&gt; <br />
&gt; <br />
&gt; What do you mean with 'kills apache', does it terminate apache or does<br />
&gt; apache hang (eg. 100% cpu), and respond normal after the stress test<br />
&gt; is over?<br />
&gt; And what is the index of your site? A php script, or..? Do you have<br />
&gt; ModRewrite redirects etc?<br />
&gt; <br />
&gt; - Matijn<br />
&gt; <br />
&gt; -- <br />
&gt; PHP General Mailing List (http://www.php.net/)<br />
&gt; To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a><br />
&gt; <br />
<br />
Can you visit the site normally? Try less verbosing in apache, that is pretty intensive, but as you can benchmark a static file well (with moderate high settings), i assume it is some configuration problem in drupal. <br />
<br />
Greeting. <br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Camilo Sperberg</dc:creator>
            <category>php-general</category>
            <pubDate>Thu, 10 May 2012 19:20:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,493500,493807#msg-493807</guid>
            <title>Re: [PHP] Performance / AB issue?</title>
            <link>http://www.serverphorums.com/read.php?8,493500,493807#msg-493807</link>
            <description><![CDATA[ On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen &lt;lars@lfweb.dk&gt; wrote:<br />
&gt; Hi there,<br />
&gt;<br />
&gt; I have apache-2.22/php 5.3.10 set up on a dedicated server but I have a<br />
&gt; strange issue.<br />
&gt;<br />
&gt; I have made a Drupal 7 site with a mysql db.<br />
&gt;<br />
&gt; If I stress-test the site with : ab -c 1 -n 150 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it works<br />
&gt; fine.<br />
&gt; If I stress-test the site with : ab -c 2 -n 20 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it kills<br />
&gt; apache.<br />
&gt; If I stress-test the site with : ab -c 50 -n 1500<br />
&gt; <a href="http://sitename/static.html" target="_blank"  rel="nofollow">http://sitename/static.html</a> it works fine.<br />
&gt;<br />
&gt; I have set apache's errorlog to debug. But it writes nothing, either in<br />
&gt; the virtualhost or in the server-file.<br />
&gt;<br />
&gt; Can anyone give a hint about what can be wrong?<br />
&gt;<br />
&gt;<br />
<br />
What do you mean with 'kills apache', does it terminate apache or does<br />
apache hang (eg. 100% cpu), and respond normal after the stress test<br />
is over?<br />
And what is the index of your site? A php script, or..? Do you have<br />
ModRewrite redirects etc?<br />
<br />
- Matijn<br />
<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Matijn Woudt</dc:creator>
            <category>php-general</category>
            <pubDate>Thu, 10 May 2012 17:50:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?8,493500,493500#msg-493500</guid>
            <title>[PHP] Performance / AB issue?</title>
            <link>http://www.serverphorums.com/read.php?8,493500,493500#msg-493500</link>
            <description><![CDATA[ Hi there,<br />
<br />
I have apache-2.22/php 5.3.10 set up on a dedicated server but I have a<br />
strange issue.<br />
<br />
I have made a Drupal 7 site with a mysql db.<br />
<br />
If I stress-test the site with : ab -c 1 -n 150 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it works<br />
fine.<br />
If I stress-test the site with : ab -c 2 -n 20 <a href="http://sitename/" target="_blank"  rel="nofollow">http://sitename/</a> it kills<br />
apache.<br />
If I stress-test the site with : ab -c 50 -n 1500<br />
<a href="http://sitename/static.html" target="_blank"  rel="nofollow">http://sitename/static.html</a> it works fine.<br />
<br />
I have set apache's errorlog to debug. But it writes nothing, either in<br />
the virtualhost or in the server-file.<br />
<br />
Can anyone give a hint about what can be wrong?<br />
<br />
<br />
Best regards<br />
LFWeb<br />
Lars Nielsen<br />
<br />
<br />
-- <br />
PHP General Mailing List (http://www.php.net/)<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Lars Nielsen</dc:creator>
            <category>php-general</category>
            <pubDate>Thu, 10 May 2012 09:10:02 +0200</pubDate>
        </item>
    </channel>
</rss>
