You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by tom wheeler <to...@gmail.com> on 2014/12/27 08:50:07 UTC

[users@httpd] Post many POST data with ab tool

Hi,
I want to ask a question related to Apache Benchmark Tool, $ ab.

For example, for now I can post an JSON object (stored in /tmp/data ) with
-p /tmp/data option like this :
{
        "query" : {
                "bool" : {
                        "should" : [
                                { "match" : { "gender" : "Male"}},
                                { "match" : { "first_name" : "Albert"}},
                                { "match" : { "last_name" : "Roy"}},
                                { "match" : { "country" : "Canada"}},
                                { "match" : { "languages" : "Azeri"}},
                                { "match" : { "drugs" : "Loratadine"}},
                                { "match" : { "currency" : "Rial"}}
                        ]
                }
        }
}
If I want to post another object, I have to run ab again with different
option, -p /tmp/data2.
My question is, how can I put 2 JSON objects in one file, /tmp/data, so ab
can post these 2 object in 2 separated requests ?
Thanks.

Re: [users@httpd] Apache make fedora go into corner

Posted by georg chambert <ge...@telia.com>.
Thanx much both, will test both approches and see if
I can get closer. But depleating memory so fast
with so little traffic would be quite worrying.
On the other hand there could be intense traffic
just before crasch, and which never gets logged on file in apache logs ?

/georg

----- Original Message ----- 
From: "Dennis Jacobfeuerborn" <de...@conversis.de>
To: <us...@httpd.apache.org>
Sent: Sunday, December 28, 2014 3:08 AM
Subject: Re: [users@httpd] Apache make fedora go into corner


> In cases like these nmon is a useful tool. It's a top-like tool with the
> ability to write the stats into a log file for later analysis.
> It is really nice when you want the basics monitored but not install a
> full monitoring solution like nagios, zabbix, etc.
>
> Regards,
>  Dennis
>
> On 27.12.2014 18:03, Dr James Smith wrote:
>> If you have root access you can look in /var/log and this might show up
>> stuff in messages or syslog...
>>
>> Sometimes Apache can leak little bits of memory with each request -
>> along with other processes.
>>
>> You could also write a simple cron job which does something like:
>>
>> echo `date` `cat /proc/meminfo | grep Free | grep kB | cut -d : -f 2 |
>> xargs` >> ~/mem-free
>>
>> which will give you a log file like:
>>
>> Sat Dec 27 17:01:01 GMT 2014 80908 kB 3549440 kB
>> Sat Dec 27 17:02:01 GMT 2014 79760 kB 3549516 kB
>>
>> and so you can check that the two numbers (mem free + swap free) are not
>> both getting towards 0...
>>
>> On 27/12/2014 15:52, georg chambert wrote:
>>> Hi James,
>>> well, no, traffic hasn't been very intense, and the machines only task
>>> is to be a server, the number  of accesses
>>> (at least in logg) is quite limited, some hundred at maximum, is there
>>> a way to  check "post-mortem" ?
>>>
>>>     ----- Original Message -----
>>>     *From:* Dr James Smith <ma...@sanger.ac.uk>
>>>     *To:* users@httpd.apache.org <ma...@httpd.apache.org>
>>>     *Sent:* Saturday, December 27, 2014 3:49 PM
>>>     *Subject:* Re: [users@httpd] Apache make fedora go into corner
>>>
>>>     On 27/12/2014 13:21, georg chambert wrote:
>>>>     Hi, have for a bit of time had trouble with my server PC running
>>>>     Fedora Os and Apache.
>>>>     After some time it goes into non-communicatable mode, does not
>>>>     take any input whatsover,
>>>>     hard shutdown is only way to get out. It can be 24hours and it
>>>>     can be 14days of running before this happes.
>>>>     While if  the httpd is not active the machine has no issues.
>>>>     So where do I look to find answers; short look in access_log for
>>>>     servere does not give any specific clues to what
>>>>     happens, possibly because the "hard takedown" of the machine the
>>>>     file is not closed properly ?
>>>     Have you checked top regularly to see if you are running the
>>>     machine out of memory.
>>>
>>>>     Any suggestions ?
>>>>     Georg
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>     <http://www.avast.com/>
>>>
>>>     This email has been checked for viruses by Avast antivirus software.
>>>     www.avast.com <http://www.avast.com/>
>>>
>>>
>>>
>>>     -- The Wellcome Trust Sanger Institute is operated by Genome
>>>     Research Limited, a charity registered in England with number
>>>     1021457 and a company registered in England with number 2742969,
>>>     whose registered office is 215 Euston Road, London, NW1 2BE.
>>>
>>
>>
>>
>> ---
>> This email has been checked for viruses by Avast antivirus software.
>> http://www.avast.com
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache make fedora go into corner

Posted by Dennis Jacobfeuerborn <de...@conversis.de>.
In cases like these nmon is a useful tool. It's a top-like tool with the
ability to write the stats into a log file for later analysis.
It is really nice when you want the basics monitored but not install a
full monitoring solution like nagios, zabbix, etc.

Regards,
  Dennis

On 27.12.2014 18:03, Dr James Smith wrote:
> If you have root access you can look in /var/log and this might show up
> stuff in messages or syslog...
> 
> Sometimes Apache can leak little bits of memory with each request -
> along with other processes.
> 
> You could also write a simple cron job which does something like:
> 
> echo `date` `cat /proc/meminfo | grep Free | grep kB | cut -d : -f 2 |
> xargs` >> ~/mem-free
> 
> which will give you a log file like:
> 
> Sat Dec 27 17:01:01 GMT 2014 80908 kB 3549440 kB
> Sat Dec 27 17:02:01 GMT 2014 79760 kB 3549516 kB
> 
> and so you can check that the two numbers (mem free + swap free) are not
> both getting towards 0...
> 
> On 27/12/2014 15:52, georg chambert wrote:
>> Hi James,
>> well, no, traffic hasn't been very intense, and the machines only task
>> is to be a server, the number  of accesses
>> (at least in logg) is quite limited, some hundred at maximum, is there
>> a way to  check "post-mortem" ?
>>
>>     ----- Original Message -----
>>     *From:* Dr James Smith <ma...@sanger.ac.uk>
>>     *To:* users@httpd.apache.org <ma...@httpd.apache.org>
>>     *Sent:* Saturday, December 27, 2014 3:49 PM
>>     *Subject:* Re: [users@httpd] Apache make fedora go into corner
>>
>>     On 27/12/2014 13:21, georg chambert wrote:
>>>     Hi, have for a bit of time had trouble with my server PC running
>>>     Fedora Os and Apache.
>>>     After some time it goes into non-communicatable mode, does not
>>>     take any input whatsover,
>>>     hard shutdown is only way to get out. It can be 24hours and it
>>>     can be 14days of running before this happes.
>>>     While if  the httpd is not active the machine has no issues.
>>>     So where do I look to find answers; short look in access_log for
>>>     servere does not give any specific clues to what
>>>     happens, possibly because the "hard takedown" of the machine the
>>>     file is not closed properly ?
>>     Have you checked top regularly to see if you are running the
>>     machine out of memory.
>>
>>>     Any suggestions ?
>>>     Georg
>>
>>
>>
>>    
>> ------------------------------------------------------------------------
>>     <http://www.avast.com/>    
>>
>>     This email has been checked for viruses by Avast antivirus software.
>>     www.avast.com <http://www.avast.com/>
>>
>>
>>
>>     -- The Wellcome Trust Sanger Institute is operated by Genome
>>     Research Limited, a charity registered in England with number
>>     1021457 and a company registered in England with number 2742969,
>>     whose registered office is 215 Euston Road, London, NW1 2BE.
>>
> 
> 
> 
> ---
> This email has been checked for viruses by Avast antivirus software.
> http://www.avast.com
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache make fedora go into corner

Posted by Dr James Smith <js...@sanger.ac.uk>.
If you have root access you can look in /var/log and this might show up 
stuff in messages or syslog...

Sometimes Apache can leak little bits of memory with each request - 
along with other processes.

You could also write a simple cron job which does something like:

echo `date` `cat /proc/meminfo | grep Free | grep kB | cut -d : -f 2 | 
xargs` >> ~/mem-free

which will give you a log file like:

Sat Dec 27 17:01:01 GMT 2014 80908 kB 3549440 kB
Sat Dec 27 17:02:01 GMT 2014 79760 kB 3549516 kB

and so you can check that the two numbers (mem free + swap free) are not 
both getting towards 0...

On 27/12/2014 15:52, georg chambert wrote:
> Hi James,
> well, no, traffic hasn't been very intense, and the machines only task 
> is to be a server, the number  of accesses
> (at least in logg) is quite limited, some hundred at maximum, is there 
> a way to  check "post-mortem" ?
>
>     ----- Original Message -----
>     *From:* Dr James Smith <ma...@sanger.ac.uk>
>     *To:* users@httpd.apache.org <ma...@httpd.apache.org>
>     *Sent:* Saturday, December 27, 2014 3:49 PM
>     *Subject:* Re: [users@httpd] Apache make fedora go into corner
>
>     On 27/12/2014 13:21, georg chambert wrote:
>>     Hi, have for a bit of time had trouble with my server PC running
>>     Fedora Os and Apache.
>>     After some time it goes into non-communicatable mode, does not
>>     take any input whatsover,
>>     hard shutdown is only way to get out. It can be 24hours and it
>>     can be 14days of running before this happes.
>>     While if  the httpd is not active the machine has no issues.
>>     So where do I look to find answers; short look in access_log for
>>     servere does not give any specific clues to what
>>     happens, possibly because the "hard takedown" of the machine the
>>     file is not closed properly ?
>     Have you checked top regularly to see if you are running the
>     machine out of memory.
>
>>     Any suggestions ?
>>     Georg
>
>
>
>     ------------------------------------------------------------------------
>     <http://www.avast.com/> 	
>
>     This email has been checked for viruses by Avast antivirus software.
>     www.avast.com <http://www.avast.com/>
>
>
>
>     -- The Wellcome Trust Sanger Institute is operated by Genome
>     Research Limited, a charity registered in England with number
>     1021457 and a company registered in England with number 2742969,
>     whose registered office is 215 Euston Road, London, NW1 2BE.
>



---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

Re: [users@httpd] Apache make fedora go into corner

Posted by georg chambert <ge...@telia.com>.
Hi James,

well, no, traffic hasn't been very intense, and the machines only task is to be a server, the number  of accesses
(at least in logg) is quite limited, some hundred at maximum, is there a way to  check "post-mortem" ?


  ----- Original Message ----- 
  From: Dr James Smith 
  To: users@httpd.apache.org 
  Sent: Saturday, December 27, 2014 3:49 PM
  Subject: Re: [users@httpd] Apache make fedora go into corner


  On 27/12/2014 13:21, georg chambert wrote:

    Hi, have for a bit of time had trouble with my server PC running Fedora Os and Apache.

    After some time it goes into non-communicatable mode, does not take any input whatsover,
    hard shutdown is only way to get out. It can be 24hours and it can be 14days of running before this happes.
    While if  the httpd is not active the machine has no issues.  

    So where do I look to find answers; short look in access_log for servere does not give any specific clues to what
    happens, possibly because the "hard takedown" of the machine the file is not closed properly ?

  Have you checked top regularly to see if you are running the machine out of memory.


    Any suggestions ?

    Georg




------------------------------------------------------------------------------
          This email has been checked for viruses by Avast antivirus software. 
        www.avast.com 
       


  -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. 

Re: [users@httpd] Apache make fedora go into corner

Posted by Dr James Smith <js...@sanger.ac.uk>.
On 27/12/2014 13:21, georg chambert wrote:
> Hi, have for a bit of time had trouble with my server PC running 
> Fedora Os and Apache.
> After some time it goes into non-communicatable mode, does not take 
> any input whatsover,
> hard shutdown is only way to get out. It can be 24hours and it can be 
> 14days of running before this happes.
> While if  the httpd is not active the machine has no issues.
> So where do I look to find answers; short look in access_log for 
> servere does not give any specific clues to what
> happens, possibly because the "hard takedown" of the machine the file 
> is not closed properly ?
Have you checked top regularly to see if you are running the machine out 
of memory.

> Any suggestions ?
> Georg



---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

[users@httpd] Apache make fedora go into corner

Posted by georg chambert <ge...@telia.com>.
Hi, have for a bit of time had trouble with my server PC running Fedora Os and Apache.

After some time it goes into non-communicatable mode, does not take any input whatsover,
hard shutdown is only way to get out. It can be 24hours and it can be 14days of running before this happes.
While if  the httpd is not active the machine has no issues.  

So where do I look to find answers; short look in access_log for servere does not give any specific clues to what
happens, possibly because the "hard takedown" of the machine the file is not closed properly ?

Any suggestions ?

Georg