Website is going down 3 to 4 times in a day

Keywords: WordPress - AWS - Technical issue - Plugins installation/configuration

bnsupport ID: a6551986-85e3-1fbc-2c03-9706dd00dd22

bndiagnostic output:

? Apache: Found possible issues
? Mariadb: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections-bots-apache/
https://docs.bitnami.com/aws/apps/wordpress/troubleshooting/debug-errors-mariadb/

bndiagnostic failure reason: The suggested guides are not related with my issue

Description:
I am facing Multiple issues.

  1. Website is going down again & again

  2. Can’t find conf folder to set browser cache settings

  3. Apache is showing out of memory error, so to increase memory I can’t find /opt/bitnami/apps/wordpress/conf/httpd-app.conf to change memory.

    php_value memory_limit 2048M

Thanks

Website is https://azaanjobs.com
Ec2 instance type is t3a.medium

Apache Errors in Log
https://we.tl/t-wuOdCScmkq

Hi @azaanjobsservices,

It seems there are a couple of IPs that are accessing your instance many times

-----------------------------------
Check performance issues: Count number of requests for the 10 most active IP addresses in the last 100.000 requests
-----------------------------------
Running: tail -n 100000 access_log | awk '{print $1}' | sort | uniq -c | sort -nr | head -n 10 | awk '{print $1}'
In: /opt/bitnami/apache2/logs/

Output:

13099
11849
11289
2000
134

Can you take a look at this guide?

https://docs.bitnami.com/aws/apps/wordpress/troubleshooting/deny-connections-bots-apache/

what do you mean with this?

You can change the memory limit by following this guide

https://docs.bitnami.com/aws/apps/wordpress/configuration/configure-phpfpm-options/

Happy to help!


Was my answer helpful? Click on :heart:

Output - bitnami@ip-172-31-37-103:/opt/bitnami/apache2/logs$ tail -n 10000 access_log | awk ‘{print $1}’| sort| uniq -c| sort -nr| head -n 10
6039 172.31.37.103
1393 172.31.16.50
1322 172.31.5.59
1226 172.31.41.63
8 13.232.21.219
2 76.98.82.31
2 159.203.33.94
2 135.125.246.110
1 64.62.197.92
1 45.83.67.128
Nothing suspicious, 172.31..* are aws ips, I uploaded thousands of files for CDN over s3.

Followed the guide and changed

memory_limit = 512M
 php_value[memory_limit]= 512M

2nd problem, I followed below guide to leverage browser cache but I can’t find “/opt/bitnami/apps/wordpress/conf/httpd-app.conf” & htaccess.conf file.

Thanks

You need to edit the “wordpress” files under the /opt/bitnami/apache2/conf/vhosts folder and restart Apache.

Let us know if you have any questions.

I think my website was going down because of high RAM usage, My ec2 ram is 4 gb & I disable all plugins & using twentytwentone , my RAM usage is

free -m

              total        used        free      shared  buff/cache   available
Mem:           3901        1508         721         138        1670        2003
Swap:             0           0           0

Why is it taking so much Memory?

Hi @azaanjobsservices,

You have a lot of available RAM memory in the instance so that shouldn’t be a problem. This command returns the amount of memory every process is using, can you run it?

ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS

https://docs.bitnami.com/aws/faq/troubleshooting/troubleshoot-server-performance/

Thanks

    0 [cpuhp/0]
    0 [cpuhp/1]
    0 [crypto]
    0 [ena]
    0 [ext4-rsv-conver]
    0 [ipv6_addrconf]
    0 [jbd2/nvme0n1p1-]
    0 [kauditd]
    0 [kblockd]
    0 [kcompactd0]
    0 [kdevtmpfs]
    0 [khugepaged]
    0 [khungtaskd]
    0 [kintegrityd]
    0 [ksmd]
    0 [ksoftirqd/0]
    0 [ksoftirqd/1]
    0 [kstrp]
    0 [kswapd0]
    0 [kthreadd]
    0 [kthrotld]
    0 [kworker/0:0-cgroup_destroy]
    0 [kworker/0:0H-kblockd]
    0 [kworker/0:1-events]
    0 [kworker/0:1H-kblockd]
    0 [kworker/1:0H-kblockd]
    0 [kworker/1:0-memcg_kmem_cache]
    0 [kworker/1:1H-kblockd]
    0 [kworker/1:1-mm_percpu_wq]
    0 [kworker/u4:1-events_unbound]
    0 [kworker/u4:2-events_unbound]
    0 [kworker/u5:0]
    0 [migration/0]
    0 [migration/1]
    0 [mm_percpu_wq]
    0 [netns]
    0 [nvme-delete-wq]
    0 [nvme-reset-wq]
    0 [nvme-wq]
    0 [oom_reaper]
    0 [rcu_bh]
    0 [rcu_gp]
    0 [rcu_par_gp]
    0 [rcu_sched]
    0 [watchdogd]
    0 [writeback]
  268 /usr/sbin/chronyd -F -1
  740 pr -TW80
  788 sort -b -k1,1n
 2072 /usr/sbin/atd -f
 2276 /usr/sbin/chronyd -F -1
 2332 (sd-pam)
 2620 sshd: [net]
 2784 /usr/sbin/cron -f
 2972 ps -e -orss=,args=
 3640 /usr/sbin/rsyslogd -n -iNONE
 4120 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --sy
 4568 -bash
 4776 /usr/sbin/haveged --Foreground --verbose=1 -w 1024
 4876 sshd: bitnami@pts/0
 4920 /lib/systemd/systemd-udevd
 5524 /sbin/dhclient -6 -v -pf /run/dhclient6.ens5.pid -lf /var/lib/dhcp/dhclien
 5888 /sbin/dhclient -4 -v -i -pf /run/dhclient.ens5.pid -lf /var/lib/dhcp/dhcli
 6692 sshd: [accepted]
 7172 /usr/sbin/sshd -D
 7440 /lib/systemd/systemd-logind
 8056 sshd: bitnami [priv]
 8376 /lib/systemd/systemd --user
 8412 /opt/bitnami/apache/bin/httpd -f /opt/bitnami/apache/conf/httpd.conf
 9220 /lib/systemd/systemd-journald
10008 /sbin/init
16876 /opt/bitnami/gonit/bin/gonit
17292 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdow
19908 /opt/bitnami/apache/bin/httpd -f /opt/bitnami/apache/conf/httpd.conf
23276 /opt/bitnami/apache/bin/httpd -f /opt/bitnami/apache/conf/httpd.conf
23796 /opt/bitnami/apache/bin/httpd -f /opt/bitnami/apache/conf/httpd.conf
24188 /opt/bitnami/apache/bin/httpd -f /opt/bitnami/apache/conf/httpd.conf
24924 /opt/bitnami/apache/bin/httpd -f /opt/bitnami/apache/conf/httpd.conf
25448 /opt/bitnami/apache/bin/httpd -f /opt/bitnami/apache/conf/httpd.conf
28952 /opt/bitnami/apache/bin/httpd -f /opt/bitnami/apache/conf/httpd.conf
39548 php-fpm: master process (/opt/bitnami/php/etc/php-fpm.conf)
118672 php-fpm: pool www
120892 php-fpm: pool www
121408 php-fpm: pool www
122184 php-fpm: pool www
125400 php-fpm: pool www
126296 php-fpm: pool www
126576 php-fpm: pool www
128164 php-fpm: pool www
130156 php-fpm: pool www
134896 php-fpm: pool www
135852 php-fpm: pool www
135968 php-fpm: pool www
136216 php-fpm: pool www
136396 php-fpm: pool www
140628 php-fpm: pool www
141844 php-fpm: pool www
143332 php-fpm: pool www
143408 php-fpm: pool www
145488 php-fpm: pool www
147244 php-fpm: pool www
149112 php-fpm: pool www
151080 php-fpm: pool www
153380 php-fpm: pool www
153996 php-fpm: pool www
154352 php-fpm: pool www
154816 php-fpm: pool www
155124 php-fpm: pool www
155420 php-fpm: pool www
157996 php-fpm: pool www
159888 php-fpm: pool www
160284 php-fpm: pool www
161388 php-fpm: pool www
162144 php-fpm: pool www
163664 php-fpm: pool www
164716 php-fpm: pool www
165824 php-fpm: pool www
168952 php-fpm: pool www
176984 php-fpm: pool www
177820 php-fpm: pool www
178248 php-fpm: pool www
184436 php-fpm: pool www
186524 php-fpm: pool www
186632 php-fpm: pool www
187936 php-fpm: pool www
189904 php-fpm: pool www

Hi @azaanjobsservices,

You have a lot of php-fpm processes running but I do not see a problem in your instance. If you want to edit the number of running processes, please check this

https://docs.bitnami.com/aws/apps/wordpress/configuration/configure-phpfpm-processes/