0

I'm new to server administration. Whenever I systemctl restart apache2 the /usr/sbin/apache2 -k start processes fill up immediately in the hundreds. It seems that after this happens my raw ipaddress (port 80) proxy to my web app (port 3000) doesn't work anymore. However I can always directly connect to my ipaddress:3000 with no issues. Wondering if these processes are interfering with the proxy since they are hitting :80. Or am I incorrectly setting up the proxy in my /etc/apache2/sites-available/000-default.conf file?

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    
    ProxyPreserveHost On
    ProxyRequests On
    ProxyPass / http://localhost:3000/
    ProxyPassReverse / http://localhost:3000/

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Just in case if this matters:

<IfModule mpm_prefork_module>
    StartServers             5
    MinSpareServers       5
    MaxSpareServers      10
    MaxRequestWorkers     150
    MaxConnectionsPerChild   0
</IfModule>

How my top output looks like:

top - 15:40:22 up 196 days, 18:45,  2 users,  load average: 0.02, 0.01, 0.00
Tasks: 324 total,   1 running, 323 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.9 us,  0.2 sy,  0.0 ni, 98.8 id,  0.1 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :  16009.1 total,    298.0 free,   1697.5 used,  14013.7 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used.  13970.2 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                  
4151496 mysql     20   0 3759520 666068  17920 S   1.3   4.1  14:49.22 /usr/sbin/mysqld                         
   4860 root      20   0  480692 341560  22144 S   6.0   2.1   0:31.14 php cronjob.php                          

   4159 www-data  20   0  225560  14012   7184 S   0.0   0.1   0:00.03 /usr/sbin/apache2 -k start               
   4154 www-data  20   0  225552  14000   7180 S   0.0   0.1   0:00.03 /usr/sbin/apache2 -k start               
   4104 www-data  20   0  225536  13976   7172 S   0.0   0.1   0:00.02 /usr/sbin/apache2 -k start               
   4129 www-data  20   0  225560  13968   7172 S   0.0   0.1   0:00.02 /usr/sbin/apache2 -k start               
   4125 www-data  20   0  225432  13900   7176 S   0.0   0.1   0:00.01 /usr/sbin/apache2 -k start               
   4250 www-data  20   0  225552  13888   7200 S   0.0   0.1   0:00.02 /usr/sbin/apache2 -k start               
   4181 www-data  20   0  225560  13856   7176 S   0.0   0.1   0:00.03 /usr/sbin/apache2 -k start               
   4112 www-data  20   0  225392  13548   7000 S   0.0   0.1   0:00.02 /usr/sbin/apache2 -k start               
   4238 www-data  20   0  225560  13528   7000 S   0.0   0.1   0:00.02 /usr/sbin/apache2 -k start               
   4223 www-data  20   0  225408  13524   6996 S   0.0   0.1   0:00.01 /usr/sbin/apache2 -k start               
   4224 www-data  20   0  225552  13524   7000 S   0.0   0.1   0:00.04 /usr/sbin/apache2 -k start               
   4249 www-data  20   0  225408  13524   7000 S   0.0   0.1   0:00.01 /usr/sbin/apache2 -k start               
   4233 www-data  20   0  225544  13520   7000 S   0.0   0.1   0:00.02 /usr/sbin/apache2 -k start               
   4241 www-data  20   0  225560  13512   7000 S   0.0   0.1   0:00.02 /usr/sbin/apache2 -k start               
  

and on Chrome I get the following:

Try:

Checking the connection
Checking the proxy and the firewall
ERR_TIMED_OUT
Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
  • What ```apache2ctl status``` is showing? Thanks, – Drixter May 10 '21 at 18:46
  • apache2ctl status /usr/sbin/apache2ctl: 113: www-browser: not found 'www-browser -dump http://localhost:80/server-status' failed. Maybe you need to install a package providing www-browser or you need to adjust the APACHE_LYNX variable in /etc/apache2/envvars – HenryAD May 10 '21 at 20:07
  • Thanks so much for the suggestion, will look into this error and see if it will fix it. – HenryAD May 10 '21 at 20:08
  • hmm, apache2ctl status works only right after I systemctl restart apache2 with the following message (otherwise it just hangs) "Cannot GET /server-status 'www-browser -dump http://localhost:80/server-status' failed. Maybe you need to install a package providing www-browser or you need to adjust the APACHE_LYNX variable in /etc/apache2/envvars ". Any more suggestions is greatly appreciated – HenryAD May 10 '21 at 22:35

0 Answers0