MaxRequestWorkers

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

MaxRequestWorkers

Postby covarrubiasgg » Wed Feb 04, 2015 11:05 pm

Lately i have seen a lot of this messages on my apache´s log

Code: Select all
[Wed Feb 04 11:04:35.591885 2015] [mpm_prefork:error] [pid 16910] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting


But today after an over all to update to my servers (zypper update and upgraded a vicibox 4.0 to vicbox 6.0) i started having a lot of these:

Code: Select all
[Wed Feb 04 11:05:45.580187 2015] [php5:error] [pid 23758] [client 192.168.100.1:39379] PHP Warning:  mysqli_connect(): (HY000/2002): Resource temporarily unavailable in /srv/www/htdocs/agc/dbconnect_mysqli.php on line 49, referer: http://192.168.100.50/agc/vicidial.php
[Wed Feb 04 11:05:45.580191 2015] [php5:error] [pid 23735] [client 192.168.100.1:39407] PHP Warning:  mysqli_connect(): (HY000/2002): Resource temporarily unavailable in /srv/www/htdocs/agc/dbconnect_mysqli.php on line 49, referer: http://192.168.100.50/agc/vicidial.php
[Wed Feb 04 11:05:45.580222 2015] [php5:error] [pid 23735] [client 192.168.100.1:39407] PHP Warning:  mysqli_error() expects parameter 1 to be mysqli, boolean given in /srv/www/htdocs/agc/dbconnect_mysqli.php on line 52, referer: http://192.168.100.50/agc/vicidial.php
[Wed Feb 04 11:05:45.580222 2015] [php5:error] [pid 23758] [client 192.168.100.1:39379] PHP Warning:  mysqli_error() expects parameter 1 to be mysqli, boolean given in /srv/www/htdocs/agc/dbconnect_mysqli.php on line 52, referer: http://192.168.100.50/agc/vicidial.php
[Wed Feb 04 11:05:45.580221 2015] [php5:error] [pid 23748] [client 192.168.100.1:39394] PHP Warning:  mysqli_connect(): (HY000/2002): Resource temporarily unavailable in /srv/www/htdocs/agc/dbconnect_mysqli.php on line 49, referer: http://192.168.100.50/agc/vicidial.php
[Wed Feb 04 11:05:45.580241 2015] [php5:error] [pid 23748] [client 192.168.100.1:39394] PHP Warning:  mysqli_error() expects parameter 1 to be mysqli, boolean given in /srv/www/htdocs/agc/dbconnect_mysqli.php on line 52, referer: http://192.168.100.50/agc/vicidial.php
[Wed Feb 04 11:05:45.580340 2015] [php5:error] [pid 23755] [client 192.168.100.1:39377] PHP Warning:  mysqli_connect(): (HY000/2002): Resource temporarily unavailable in /srv/www/htdocs/agc/dbconnect_mysqli.php on line 49, referer: http://192.168.100.50/agc/vicidial.php
[Wed Feb 04 11:05:45.580369 2015] [php5:error] [pid 23755] [client 192.168.100.1:39377] PHP Warning:  mysqli_error() expects parameter 1 to be mysqli, boolean given in /srv/www/htdocs/agc/dbconnect_mysqli.php on line 52, referer: http://192.168.100.50/agc/vicidial.php
[Wed Feb 04 11:05:45.580945 2015] [php5:error] [pid 23667] [client 192.168.100.1:39374] PHP Warning:  mysqli_connect(): (HY000/2002): Resource temporarily unavailable in /srv/www/htdocs/agc/dbconnect_mysqli.php on line 49, referer: http://192.168.100.50/agc/vicidial.php


When this happens it prevents agents from loggin in..

I have seen this before with overloaded servers, but this build´s load is always below 1.

This is a Xeon E3 3.0 Ghz + 8 GB ECC RAM & 3 x Core i5 Dialers for 80 agents mostly using MANUAL DIAL or RATIO 1 (1.5 Max)

I think it is enough server, so i am thinking this is a configuration issue, specially this part:

Code: Select all
[Wed Feb 04 11:04:35.591885 2015] [mpm_prefork:error] [pid 16910] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting


I had been looking for the MaxRequestWorkers on the apache´s configuration, but i can´t find it.

These are the screen on the database and phone servers

Code: Select all
vicidial-db:~ # screen -ls
There are screens on:
        17736.ASTemail  (Detached)
        17734.ASTVDadFILL       (Detached)
        17732.ASTVDadapt        (Detached)
3 Sockets in /var/run/screens/S-root.

vdts51:~ # screen -ls
There are screens on:
        3276.ASTVDremote        (Detached)
        3273.ASTVDauto  (Detached)
        3270.ASTlisten  (Detached)
        3267.ASTsend    (Detached)
        3264.ASTupdate  (Detached)
        2596.asterisk   (Detached)
        2545.ASTfastlog (Detached)
        2526.astshell20150204194401     (Detached)
8 Sockets in /var/run/screens/S-root.

vd-ts02:~ # screen -ls
There are screens on:
        1668.ASTVDremote        (Detached)
        1665.ASTlisten  (Detached)
        1662.ASTsend    (Detached)
        1659.ASTupdate  (Detached)
        1629.asterisk   (Detached)
        1624.astshell20150204194010     (Detached)
        1556.ASTfastlog (Detached)
        1549.ASTVDauto  (Detached)
8 Sockets in /var/run/screens/S-root.

vdts53:~ # screen -ls
There are screens on:
        2160.ASTVDremote        (Detached)
        2158.ASTVDauto  (Detached)
        2156.ASTlisten  (Detached)
        2154.ASTsend    (Detached)
        2152.ASTupdate  (Detached)
        2066.ASTfastlog (Detached)
        2019.asterisk   (Detached)
        2014.astshell20150204203958     (Detached)
8 Sockets in /var/run/screens/S-root.


Any advice on ths issue? Do you think it is time to split the database from the web server? Is this something i can fix optimizing apache´s cofiguration? or maybe something more complicated?

Any help is very welcome, thank you very much in advance.
covarrubiasgg
 
Posts: 420
Joined: Thu Jun 10, 2010 10:20 am
Location: Tijuana, Mexico

Re: MaxRequestWorkers

Postby DomeDan » Thu Feb 05, 2015 5:26 am

MaxClients was renamed to MaxRequestWorkers in apache 2.4
look if you can find the setting
grep -iR 'MaxRequestWorkers' /etc/
and if that is not found then look for the old name:
grep -iR 'MaxClients' /etc/
maybe use that or change it, idk
i found that in my /etc/apache2/server-tuning.conf

its not a good idea to run zypper up because then the software will be updated to versions that has not been tested by the vicidial team

if you restart apache, will you get those "PHP Warning: mysqli_error() expects parameter 1 to be mysqli" warnings directly or only when MaxRequestWorkers is reached?

well begin with to raise the MaxRequestWorkers/MaxClients value.
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: MaxRequestWorkers

Postby covarrubiasgg » Tue Feb 10, 2015 10:48 pm

Sorry for the delay.

I already increase the MaxClients i will look forward for the results.

Thank you very much for you help finding the propper config file :)

BTW i though vicibox used a special repo with updates tested by Kumba or someone from vicidial, its nice to know that it is not the case. Thanks for the tip.
covarrubiasgg
 
Posts: 420
Joined: Thu Jun 10, 2010 10:20 am
Location: Tijuana, Mexico


Return to Support

Who is online

Users browsing this forum: No registered users and 84 guests