1

I have a news android application which is workes on API as backend (admin panel) on symfony (PHP Frameworks).

When i send push notification API (Firebase) to my user my server response very slow. after some times my server works properly.

My application have - 10,000 active users

Server Details --

  • 2vCPU and 8GB RAM (On Google Cloud)
  • Operating System - Ubuntu 18.04
  • Web server - Apache2
  • Database - MySQL
  • PHP version - PHP 7.0 (Because my application does not support higher php version)

Apache mpm_prefork_module configuration details

<IfModule mpm_prefork_module>
    StartServers             20
    MinSpareServers          20
    MaxSpareServers          80
    ServerLimit              4000
    MaxRequestWorkers        35000
    MaxConnectionsPerChild   0
</IfModule>

All the apache and MySQL's settings are default.

Here is my Apache web server configuration (SSL)

https://ibb.co/pdWptkn

Apache Error Logs --

[Thu Sep 03 05:49:38.326292 2020] [mpm_prefork:notice] [pid 3102] AH00169: caught SIGTERM, shutting down
[Thu Sep 03 05:49:38.543477 2020] [mpm_prefork:notice] [pid 18326] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 configured -- resuming normal operations
[Thu Sep 03 05:49:38.543522 2020] [core:notice] [pid 18326] AH00094: Command line: '/usr/sbin/apache2'

This is my Highest usage of memory Check Here

https://ibb.co/w6LP7r6

Please guys give me any solution for this issue.

Thanks in Advance.

Arman Ali
  • 11
  • 1
  • 1
    You need to profile your Symfony application to find the bottlenecks, and fix them. There isn't any silver bullet in Apache configuration that could help you. – Tero Kilkanen Sep 03 '20 at 16:30
  • Turn on the slowlog to see if some query is the villain. http://mysql.rjweb.org/doc.php/mysql_analysis#slow_queries_and_slowlog – Rick James Sep 03 '20 at 17:31
  • @TeroKilkanen But the same applicaton works properly on shared hosting. (But they are not providing enough resources). I think there is some issue with server setup. – Arman Ali Sep 03 '20 at 18:04
  • Maybe you are missing modules required by caching. Without knowing the application details, it is impossible to say what is wrong. – Tero Kilkanen Sep 03 '20 at 19:43

0 Answers0