Server getting overloaded when using mainWP

Hi there,

I am writing this post because I have been having trouble with my server using mainWP.
The server gets very slow at time and I have spotted that it’s coming from mainWP (as soon as I deactivate the site, no problem anymore).

Details :
Dedicated server with 8Gb
Debian
Apache / php-fpm / MySQL
mainWP managing like 50 websites

I noticed when that this is happening, swap gets full and server becomes inacessible.
If I manage to restart apache, then it will work for a few hours until the same situation happens.
The server is a staging server where several websites are also hosted but with almost no traffic.

I was wondering if there is a solution to solve this issue, if I need to move mainWP to another server (and why if there is almost no traffic on this one).

THanks for your help.

Kind regards

Hi tuxtux00,

thanks for reaching out.

Can you please tell me do you have only the MainWP Dashboard on this server or all child sites too?

Hi @bogdan,
I have mainWP and some child sites.

Regards

Hi tuxtux00,

thanks for getting back to me.

Can you please send me more details about your setup?

  • Number of child sites
  • Server specs
  • System report from your dashboard

Hi @bogdan

Server specs
Intel i3-2130
2To
8Go ram
Debian 10
Apache 2.4 / php 7.3 / MySQL 5.7

I have 46 child sites and about half of them are on the same server as mainWP dashboard

What do you mean by system report from dashboard ?

Feel free if you need more informations.

Regards

Hi tuxtux00,

thanks for getting back to me.
On your Dashboard site, please check the MainWP > Status > Server Info page. There you can get the system report.

hi @bogdan

Ok let me try this.

I hope I will be able to do it as the server often gets overloaded as soon as I activate the site

Please find attached server info

Server Info Required Detected Statut

Tableau de bord MainWP
Version du tableau de bord MAINWP 4.1.5.1 4.1.4.1 Warning
MainWP Upload Directory Writable Writable Pass
Extensions MainWP
Activity Log for MainWP 1.6.1
Advanced Uptime Monitor Extension 5.1.1 API License Active Pass
MainWP Client Reports Extension 4.0.7 API License Active Pass
MainWP iThemes Security Extension 4.0.4 API License Active Pass
MainWP Page Speed Extension 4.0.1.1 API License Active Pass
MainWP Rocket Extension 4.0.1.1 API License Active Pass
MainWP Sucuri Extension 4.0.8.1 API License Active Pass
Analyse de vulnérabilités MainWP 4.0.3.1 API License Active Pass
WordPress
WordPress Version >=3.6 5.6.2 Pass
WordPress Memory Limit >=64M 40M Warning
MultiSite Disabled =true true Pass
Méthode fichier système = direct direct Pass
PHP
PHP Version >=5.6 7.3.27-2+0~20210213.78+debian10~1.gbpc9cf23 Pass
PHP Safe Mode Disabled =true true Pass
PHP Max Execution Time >=30 seconds 600 Pass
PHP Max Input Time >=30 seconds 600 Pass
PHP Memory Limit >=128M 256M Pass
PCRE Backtracking Limit >=10000 1000000 Pass
PHP Upload Max Filesize >=2M 256M Pass
PHP Post Max Size >=2M 256M Pass
SSL Extension Enabled =true true Pass
SSL Warnings = empty Pass
cURL Extension Enabled =true true Pass
cURL Timeout >=300 seconds 60 Warning
cURL Version >=7.18.1 7.64.0 Pass
cURL SSL Version >=OpenSSL/0.9.8l OpenSSL/1.1.1i Pass
Laisser URL PHP ouverte Oui
Support Exif PHP Oui ( V7.3.)
Support IPTC PHP Oui
Support XML PHP Oui
Fonctions PHP désactivées , pcntl_alarm, pcntl_async_signals, pcntl_exec, pcntl_fork, pcntl_get_last_error, pcntl_getpriority, pcntl_setpriority, pcntl_signal, pcntl_signal_dispatch, pcntl_signal_get_handler, pcntl_sigprocmask, pcntl_sigtimedwait, pcntl_sigwaitinfo, pcntl_strerror, pcntl_wait, pcntl_waitpid, pcntl_wexitstatus, pcntl_wifcontinued, pcntl_wifexited, pcntl_wifsignaled, pcntl_wifstopped, pcntl_wstopsig, pcntl_wtermsig,
Extensions PHP chargées Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, bz2, calendar, cgi-fcgi, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, imap, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, pdo_sqlite, posix, pspell, readline, recode, session, shmop, soap, sockets, sodium, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib
MySQL
MySQL Version >=5.0 5.7.33 Pass
Mode MySQL NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Encodage client MySQL utf8mb4
Server Info
Répertoire racine WordPress
Nom serveur
Server Software Apache/2.4.38 (Debian)
Système d’exploitation Linux
Architecture 64 bit
IP du serveur 192.99.11.130
Protocole du serveur HTTP/2.0
Hébergeur HTTP sites.florianperrier.com
HTTPS ACTIVÉ
Server self connect Réponse du corps HTTP non espérée :
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.152 Safari/537.36
Port du serveur 443
Gateway Interface CGI/1.1
Memory Usage 50.38 MB
Complete URL
Request Time 1616518187
Contenu accepté text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Charset Content N/D
Currently Executing Script Pathname
Current Page URI /wp-admin/admin.php?page=ServerInformation
Remote Address 95.182.208.156
Serveur distant N/D
Port distant 51818
Paramètres MainWP
Number Of Child Sites 72
Utiliser WP-Cron Oui
Optimiser pour l’hébergement mutualisé ou grands réseauxOui
Mise à jour quotidienne automatiqueDisabled
Abandoned Plugins/Themes Tolerance 365
Maximum number of posts to return
Maximum number of pages to return
Système de sauvegarde primaire Sauvegardes MainWP par défaut
Requêtes simultanées Maximum 4
Délai minimum entre les demandes 200
Maximum de demandes simultanées par IP1
Délai minimum entre les requêtes à la même IP1000
Maximum simultaneous sync requests
Minimum simultaneous install/update requests
Extensions actives
Activity Log for MainWP 1.6.1 Actif
Advanced Cron Manager 2.4.1 Actif
Classic Editor 1.6 Innactif
Contact Form 7 5.3.2 Innactif
Cookie Notice & Compliance for GDPR / CCPA2.0.3 Innactif
Insert Headers and Footers 1.5.0 Innactif
iThemes Security 7.9.0 Innactif
MainWP Child 4.1.4 Innactif
MainWP Dashboard 4.1.4.1 Actif
Slider Revolution 6.3.5 Innactif
WP Activity Log 4.2.0.1 Innactif
WPBakery Page Builder 6.5.0 Innactif
WP Mail Logging 1.9.7 Innactif
WP Mail SMTP 2.6.0 Actif
WP Rocket 3.5.4 Innactif
Yoast Duplicate Post 4.1.1 Innactif
Yoast SEO 15.9 Innactif

I actually have like 70 child sites with more than 600 pending updates.

Regards

Hi tuxtux00,

thanks for getting back to me.
Can you please update the MainWP plugin to 4.1.5.1 and make sure that the MainWP Child plugin is also update to the latest version and see if the problem still persists?

Hi @bogdan,

Thanks for your feedback.
I will update but I am afraid that won’t change too much because I was also having the same issue when the mainWP dashboard was updated.

Regards

Hi tuxtux00,

let us know how it goes.

Hi @bogdan,

Still the same.

Can there be any issues when hosting mainWP dashboard and several child sites on the same server ?

Hi tuxtux00,

if the server has enough resources there should be no problems. However, it all depends on how sites are used and how many resources your sites are using.

Have you tried to review all server logs and see if there are any errors that jump our or some slow query notices… anything that would point us to what is causing the problem?

Hi @bogdan

After looking for a solution for a few days, I managed to fix it by changing php-fpm configuration.

I will wait for a few days before confirming that the problem is solved and will also try to give more details to my problem and solution.

Regards

Hi tuxtux00,

thanks for letting us know.
I am curious to know what solved the problem.

Hi @bogdan

So after one week of testing, I can say that my problem is solved and let me try to explain what I did to solve it.

As I said in my first emails, I have mainWP dashboard and like more than 20 child websites hosted on the same server.
It is a dedicated server only used for staging websites and the mainWP dashboard.

The issue was related to php-fpm configuration.
All the websites were set to dynamic in the pool files with the following
pm.start_servers = 2
which means that when the server starts, 2 child process were created.
I guess that was too much for this server which couldn’t handle all the child process plus the load of mainWP dashboard.
The ram and swap were fully used and the server were getting overloaded every day when I was trying to load a page.

What I did to fix this is, I set pm = ondemand for every pool.
As I said it is a staging server and most of the websites are inactive.
Now process is only created if the site is used.
ondemande will be a bit slower as the process will be created when the request is made but the advantage is that ressources are not used when website is inactive.

Thank you for your help and your patience.

Kind regards

Hi @tuxtux00,

thanks so much for sharing the solution.

I am sure this will help other users that stumble upon the same or similar problem.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.