Push notifications often crashes Apache
Many may be the reasons why your push notifications will never see the light of day.
One of them is the configuration of mpm_prefork.conf in apache.
When you send a push notification your server will generate loading and in some cases high loading .
The CPU will be 100% and in error log you will find this error:
AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
Apache will grow and your pushes will never be sent.
AH00180: WARNING: MaxRequestWorkers of 512 exceeds ServerLimit value of 256 servers, decreasing MaxRequestWorkers to 256. To increase, please see the ServerLimit directive.
The solution is to set up well : <IfModule mpm_prefork_module>
That’s the rule:
To increase it, you must also raise MaxRequestWorkers using the following formula: ServerLimit value x 25 = MaxRequestWorkers value. For example, if ServerLimit set to 20, then MaxRequestWorkers will be 20 x 25 = 500. MPM Prefork: The default MaxRequestWorkers value is 256.
For this reason a good configuration could be the following :
you should edit mpm_prefork
If you have any issues please write us to email@example.com