Lightsail LAMP fails to start or restart

Keywords: LAMP/MAMP/WAMP - AWS - Technical issue - Other
Description:
I have searched for the errors given and haven’t found any pointers, it is not specific on why it’s not starting.

I have ran the support tool and it gave me the following code:
15581f39-e712-2992-1408-21b754f1f058

And instructed me to post here

Furthermore, I have 2 similar lightsail lamp instances, which in the future might snapshot and upgrade to EC2’s. One is running fine the other is not. Note that since the beginning before I even touched anything, this second instance had already troubles starting bitnami stack. I had to delete the instance and create another blueprint, and, the same happened. But after a few reboots, it worked.

But now, after I pushed a bit with constant HTTP requests, around 500.000 per day, it kept crashing daily. I checked the php and the limits were dynamic, but I am not an expert, so I changed a few confs on the php and mysql confs for more server and connections but it didn’t fix, I am not sure if this might have aggravated the issue but I am totally lost on why bitnami stack would not start at all.

Now it only says:

bitnami@ip-172-26-7-66:~$ sudo /opt/bitnami/ctlscript.sh status
Cannot find any running daemon to contact. If it is running, make sure you are pointing to the right pid file (/var/run/gonit.pid)

I am not an expert but I am dedicated to learn and find out what is necessary to do, so any pointers would be great.

bitnami@ip-172-26-7-66:~$ systemctl status bitnami.service
● bitnami.service - LSB: bitnami init script
   Loaded: loaded (/etc/init.d/bitnami; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2021-03-29 20:53:09 UTC; 2min 18s ago
  Process: 2679 ExecStart=/etc/init.d/bitnami start (code=exited, status=1/FAILURE)

Mar 29 20:53:09 ip-172-26-7-66 bitnami[2679]: php 20:53:09.12 ERROR ==> php-fpm did not start
Mar 29 20:53:09 ip-172-26-7-66 bitnami[2679]: 2021-03-29T20:53:09.133Z - error: Unable to perform start operation Export start for php failed with exit code 1
Mar 29 20:53:09 ip-172-26-7-66 bitnami[2679]: ## 2021-03-29 20:53:09+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/010_bitnami_agent_extra...
Mar 29 20:53:09 ip-172-26-7-66 bitnami[2679]: ## 2021-03-29 20:53:09+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/020_bitnami_agent...
Mar 29 20:53:09 ip-172-26-7-66 bitnami[2679]: ## 2021-03-29 20:53:09+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/030_update_welcome_file...
Mar 29 20:53:09 ip-172-26-7-66 bitnami[2679]: ## 2021-03-29 20:53:09+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/040_bitnami_credentials_file...
Mar 29 20:53:09 ip-172-26-7-66 bitnami[2679]: ## 2021-03-29 20:53:09+00:00 ## INFO ## Running /opt/bitnami/var/init/post-start/050_clean_metadata...
Mar 29 20:53:09 ip-172-26-7-66 systemd[1]: bitnami.service: Control process exited, code=exited, status=1/FAILURE
Mar 29 20:53:09 ip-172-26-7-66 systemd[1]: bitnami.service: Failed with result 'exit-code'.
Mar 29 20:53:09 ip-172-26-7-66 systemd[1]: Failed to start LSB: bitnami init script.
bitnami@ip-172-26-7-66:~$
bitnami@ip-172-26-7-66:~$ journalctl -xe
Mar 29 20:53:09 ip-172-26-7-66 systemd[1]: bitnami.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit bitnami.service has entered the 'failed' state with result 'exit-code'.
Mar 29 20:53:09 ip-172-26-7-66 systemd[1]: Failed to start LSB: bitnami init script.
-- Subject: A start job for unit bitnami.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit bitnami.service has finished with a failure.
-- 
-- The job identifier is 1495 and the job result is failed.
Mar 29 20:53:09 ip-172-26-7-66 sudo[2670]: pam_unix(sudo:session): session closed for user root
Mar 29 20:53:48 ip-172-26-7-66 dhclient[427]: PRC: Renewing lease on eth0.
Mar 29 20:53:48 ip-172-26-7-66 dhclient[427]: XMT: Renew on eth0, interval 10640ms.
Mar 29 20:53:48 ip-172-26-7-66 dhclient[427]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.
Mar 29 20:55:03 ip-172-26-7-66 dhclient[427]: PRC: Renewing lease on eth0.
Mar 29 20:55:03 ip-172-26-7-66 dhclient[427]: XMT: Renew on eth0, interval 10050ms.
Mar 29 20:55:03 ip-172-26-7-66 dhclient[427]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.
Mar 29 20:56:18 ip-172-26-7-66 dhclient[427]: PRC: Renewing lease on eth0.
Mar 29 20:56:18 ip-172-26-7-66 dhclient[427]: XMT: Renew on eth0, interval 10750ms.
Mar 29 20:56:18 ip-172-26-7-66 dhclient[427]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.
Mar 29 20:57:33 ip-172-26-7-66 dhclient[427]: PRC: Renewing lease on eth0.
Mar 29 20:57:33 ip-172-26-7-66 dhclient[427]: XMT: Renew on eth0, interval 9310ms.
Mar 29 20:57:33 ip-172-26-7-66 dhclient[427]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.
Mar 29 20:58:48 ip-172-26-7-66 dhclient[427]: PRC: Renewing lease on eth0.
Mar 29 20:58:48 ip-172-26-7-66 dhclient[427]: XMT: Renew on eth0, interval 10420ms.
Mar 29 20:58:48 ip-172-26-7-66 dhclient[427]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.
Mar 29 21:00:03 ip-172-26-7-66 dhclient[427]: PRC: Renewing lease on eth0.
Mar 29 21:00:03 ip-172-26-7-66 dhclient[427]: XMT: Renew on eth0, interval 9920ms.
Mar 29 21:00:03 ip-172-26-7-66 dhclient[427]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.
Mar 29 21:01:18 ip-172-26-7-66 dhclient[427]: PRC: Renewing lease on eth0.
Mar 29 21:01:18 ip-172-26-7-66 dhclient[427]: XMT: Renew on eth0, interval 9890ms.
Mar 29 21:01:18 ip-172-26-7-66 dhclient[427]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.
Mar 29 21:02:33 ip-172-26-7-66 dhclient[427]: PRC: Renewing lease on eth0.
Mar 29 21:02:33 ip-172-26-7-66 dhclient[427]: XMT: Renew on eth0, interval 10280ms.
Mar 29 21:02:33 ip-172-26-7-66 dhclient[427]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.
Mar 29 21:03:48 ip-172-26-7-66 dhclient[427]: PRC: Renewing lease on eth0.
Mar 29 21:03:48 ip-172-26-7-66 dhclient[427]: XMT: Renew on eth0, interval 10600ms.
Mar 29 21:03:48 ip-172-26-7-66 dhclient[427]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.
Mar 29 21:05:03 ip-172-26-7-66 dhclient[427]: PRC: Renewing lease on eth0.
Mar 29 21:05:03 ip-172-26-7-66 dhclient[427]: XMT: Renew on eth0, interval 9800ms.
Mar 29 21:05:03 ip-172-26-7-66 dhclient[427]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.
lines 1080-1124/1124 (END)

Hi @gabrieldasilvamusic

Thanks for using Bitnami LAMP!

I have been able to take a look at the report generated by the bnsupport-tool and spotted that your instance is running on ~500MB, which is below the required minimum of 700MB.

Could you please take a look at this previous case?
https://community.bitnami.com/t/start-and-stop-services-cannot-find-any-running-daemon-to-contact-if-it-is-running-make-sure-you-are-pointing-to-the/81523

If that does not work, could you try to run these commands a share the output with us?

sudo su
/opt/bitnami/php/bin/php -m
/opt/bitnami/ctlscript.sh status
/opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf` -t
/opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf`

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Thank in advance for the help, and I chose bitnami LAMP as I figured it would be more straight forward/easier for a learner like me.

I reduced the pm.max_spare_servers=16 to pm.max_spare_servers=10 in the memory.conf, and now it starts, but it’s still erroring along bitnami script somewhere.

Do you think the LAMP was crashing due to low RAM aka from the 500.000 requests a day tests I made? I am using the low lightsail to test before moving on to a bigger one or an EC2, so tryign to learn how this works and how to increase the load.

root@ip-172-26-7-66:/home/bitnami# sudo su
root@ip-172-26-7-66:/home/bitnami# /opt/bitnami/php/bin/php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
sion
SimpleXML
soap
sockets
SPL
sqlite3
standard
tidy
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

root@ip-172-26-7-66:/home/bitnami#

root@ip-172-26-7-66:/home/bitnami# /opt/bitnami/ctlscript.sh status
apache not running
mysql already running
php-fpm not running
root@ip-172-26-7-66:/home/bitnami#

root@ip-172-26-7-66:/home/bitnami# /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf` -t

/opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf`
bash: -t: command not found
Usage: /opt/bitnami/apache2/bin/httpd [-D name] [-d directory] [-f file]
[-C “directive”] [-c “directive”]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
Options:
-D name : define a name for use in directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C “directive” : process directive before reading config files
-c “directive” : process directive after reading config files
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed vhost settings
-t -D DUMP_RUN_CFG : show parsed run settings
-S : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t -D DUMP_INCLUDES: show all included configuration files
-t : run syntax check for config files
-T : start without DocumentRoot(s) check
-X : debug mode (only one worker, do not detach)
root@ip-172-26-7-66:/home/bitnami#

I had already seen that support case and that’s how I got to the support tool

Thanks,
Gab

Hi @gabrieldasilvamusic

instance is running on ~500MB, which is below the required minimum of 700MB.

My apologies for this info, that is the required minimum for WordPress and not LAMP! Nevertheless, if the instance is running on low specs and you are load-stressing it, it is high likely that it is the root of the issue.

As per the output of the commands, the PHP service seems to be working and so does MySQL. The apache command had a typo (a misplaced ``` sign) so it did not execute correctly. Please try this one instead:

$ /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf -t
Syntax OK

If the output is Syntax OK (like mine), you could try to start all the services:

$ sudo /opt/bitnami/ctlscript.sh restart

Could you please try that and report back?

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

bitnami@ip-172-26-7-66:~$ /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf -t
Syntax OK
bitnami@ip-172-26-7-66:~$ sudo /opt/bitnami/ctlscript.sh restart
Restarting services..
Job for bitnami.service failed because the control process exited with error code.
See "systemctl status bitnami.service" and "journalctl -xe" for details.
bitnami@ip-172-26-7-66:~$

it’s weird that it doesn’t restart, I was able to start them manually yesterday and they are still running but the restart doesn’t work, could this be a script shell problem?

After what you suggested:

bitnami@ip-172-26-7-66:~$ sudo /opt/bitnami/ctlscript.sh status
apache already running
mysql already running
php-fpm already running
bitnami@ip-172-26-7-66:~$

Hi again @gabrieldasilvamusic

It is weird in fact… Could you please run the bnsupport-tool again so as to obtain updated information?

It would also be nice if you could run the following commands again:

$ journalctl -xe
$ systemctl status bitnami.service

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

f7f5a67f-f3cc-4bf5-5612-8c02b944bdd7

bitnami@ip-172-26-7-66:~$ journalctl -xe
Mar 31 11:00:52 ip-172-26-7-66 dhclient[428]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.
Mar 31 11:00:57 ip-172-26-7-66 sudo[11647]:  bitnami : TTY=pts/0 ; PWD=/home/bitnami ; USER=root ; COMMAND=/opt/bitnami/bnsupport-tool
Mar 31 11:00:57 ip-172-26-7-66 sudo[11647]: pam_unix(sudo:session): session opened for user root by bitnami(uid=0)
Mar 31 11:01:17 ip-172-26-7-66 sudo[11647]: pam_unix(sudo:session): session closed for user root
Mar 31 11:01:25 ip-172-26-7-66 sudo[11685]:  bitnami : TTY=pts/0 ; PWD=/home/bitnami ; USER=root ; COMMAND=/opt/bitnami/bnsupport-tool
Mar 31 11:01:25 ip-172-26-7-66 sudo[11685]: pam_unix(sudo:session): session opened for user root by bitnami(uid=0)
Mar 31 11:02:08 ip-172-26-7-66 dhclient[428]: PRC: Renewing lease on eth0.
Mar 31 11:02:08 ip-172-26-7-66 dhclient[428]: XMT: Renew on eth0, interval 10010ms.
Mar 31 11:02:08 ip-172-26-7-66 dhclient[428]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.
Mar 31 11:02:15 ip-172-26-7-66 sudo[11931]:     root : TTY=pts/0 ; PWD=/tmp/bndiagnostic ; USER=root ; COMMAND=/usr/bin/ls /opt/bitnami/mysql/data/./binlog.00000
Mar 31 11:02:15 ip-172-26-7-66 sudo[11931]: pam_unix(sudo:session): session opened for user root by bitnami(uid=0)
Mar 31 11:02:15 ip-172-26-7-66 sudo[11931]: pam_unix(sudo:session): session closed for user root
Mar 31 11:02:15 ip-172-26-7-66 sudo[11933]:     root : TTY=pts/0 ; PWD=/tmp/bndiagnostic ; USER=root ; COMMAND=/usr/bin/ls /opt/bitnami/mysql/data/./binlog.00000
Mar 31 11:02:15 ip-172-26-7-66 sudo[11933]: pam_unix(sudo:session): session opened for user root by bitnami(uid=0)
Mar 31 11:02:15 ip-172-26-7-66 sudo[11933]: pam_unix(sudo:session): session closed for user root
Mar 31 11:02:15 ip-172-26-7-66 sudo[11935]:     root : TTY=pts/0 ; PWD=/tmp/bndiagnostic ; USER=root ; COMMAND=/usr/bin/ls /opt/bitnami/mysql/data/./binlog.00000
Mar 31 11:02:15 ip-172-26-7-66 sudo[11935]: pam_unix(sudo:session): session opened for user root by bitnami(uid=0)
Mar 31 11:02:15 ip-172-26-7-66 sudo[11935]: pam_unix(sudo:session): session closed for user root
Mar 31 11:02:15 ip-172-26-7-66 sudo[11937]:     root : TTY=pts/0 ; PWD=/tmp/bndiagnostic ; USER=root ; COMMAND=/usr/bin/ls /opt/bitnami/mysql/data/./binlog.00000
Mar 31 11:02:15 ip-172-26-7-66 sudo[11937]: pam_unix(sudo:session): session opened for user root by bitnami(uid=0)
Mar 31 11:02:15 ip-172-26-7-66 sudo[11937]: pam_unix(sudo:session): session closed for user root
Mar 31 11:02:15 ip-172-26-7-66 sudo[11939]:     root : TTY=pts/0 ; PWD=/tmp/bndiagnostic ; USER=root ; COMMAND=/usr/bin/ls /opt/bitnami/mysql/data/./binlog.00000
Mar 31 11:02:15 ip-172-26-7-66 sudo[11939]: pam_unix(sudo:session): session opened for user root by bitnami(uid=0)
Mar 31 11:02:15 ip-172-26-7-66 sudo[11939]: pam_unix(sudo:session): session closed for user root
Mar 31 11:02:15 ip-172-26-7-66 sudo[11941]:     root : TTY=pts/0 ; PWD=/tmp/bndiagnostic ; USER=root ; COMMAND=/usr/bin/ls /opt/bitnami/mysql/data/./binlog.00001
Mar 31 11:02:15 ip-172-26-7-66 sudo[11941]: pam_unix(sudo:session): session opened for user root by bitnami(uid=0)
Mar 31 11:02:15 ip-172-26-7-66 sudo[11941]: pam_unix(sudo:session): session closed for user root
Mar 31 11:02:15 ip-172-26-7-66 sudo[11943]:     root : TTY=pts/0 ; PWD=/tmp/bndiagnostic ; USER=root ; COMMAND=/usr/bin/ls /opt/bitnami/mysql/data/./binlog.00001
Mar 31 11:02:15 ip-172-26-7-66 sudo[11943]: pam_unix(sudo:session): session opened for user root by bitnami(uid=0)
Mar 31 11:02:15 ip-172-26-7-66 sudo[11943]: pam_unix(sudo:session): session closed for user root
Mar 31 11:02:15 ip-172-26-7-66 sudo[11945]:     root : TTY=pts/0 ; PWD=/tmp/bndiagnostic ; USER=root ; COMMAND=/usr/bin/ls /opt/bitnami/mysql/data/./binlog.00001
Mar 31 11:02:15 ip-172-26-7-66 sudo[11945]: pam_unix(sudo:session): session opened for user root by bitnami(uid=0)
Mar 31 11:02:15 ip-172-26-7-66 sudo[11945]: pam_unix(sudo:session): session closed for user root
Mar 31 11:02:15 ip-172-26-7-66 sudo[11947]:     root : TTY=pts/0 ; PWD=/tmp/bndiagnostic ; USER=root ; COMMAND=/usr/bin/ls /opt/bitnami/mysql/data/./binlog.00001
Mar 31 11:02:15 ip-172-26-7-66 sudo[11947]: pam_unix(sudo:session): session opened for user root by bitnami(uid=0)
Mar 31 11:02:15 ip-172-26-7-66 sudo[11947]: pam_unix(sudo:session): session closed for user root
Mar 31 11:02:16 ip-172-26-7-66 crontab[11951]: (root) LIST (root)
Mar 31 11:02:16 ip-172-26-7-66 crontab[11953]: (root) LIST (bitnami)
Mar 31 11:02:48 ip-172-26-7-66 sudo[11685]: pam_unix(sudo:session): session closed for user root
Mar 31 11:03:23 ip-172-26-7-66 dhclient[428]: PRC: Renewing lease on eth0.
Mar 31 11:03:23 ip-172-26-7-66 dhclient[428]: XMT: Renew on eth0, interval 10180ms.
Mar 31 11:03:23 ip-172-26-7-66 dhclient[428]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.
Mar 31 11:04:38 ip-172-26-7-66 dhclient[428]: PRC: Renewing lease on eth0.
Mar 31 11:04:38 ip-172-26-7-66 dhclient[428]: XMT: Renew on eth0, interval 10680ms.
Mar 31 11:04:38 ip-172-26-7-66 dhclient[428]: RCV: Reply message on eth0 from fe80::94:dbff:fe2c:4561.

nami@ip-172-26-7-66:~$ systemctl status bitnami.service
● bitnami.service - LSB: bitnami init script
   Loaded: loaded (/etc/init.d/bitnami; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2021-03-31 09:47:38 UTC; 1h 20min ago
  Process: 9239 ExecStart=/etc/init.d/bitnami start (code=exited, status=2)
    Tasks: 556 (limit: 559)
   Memory: 284.6M
   CGroup: /system.slice/bitnami.service
           ├─ 1651 /opt/bitnami/mysql/bin/mysqld --defaults-file=/opt/bitnami/mysql/conf/my.cnf --basedir=/opt/bitnami/mysql --datadir=/bitnami/mysql/data --sock
           ├─ 1724 /opt/bitnami/gonit/bin/gonit
           ├─10919 /opt/bitnami/apache/bin/httpd -f /opt/bitnami/apache/conf/httpd.conf
           ├─11220 /opt/bitnami/apache/bin/httpd -f /opt/bitnami/apache/conf/httpd.conf
           ├─11418 /opt/bitnami/apache/bin/httpd -f /opt/bitnami/apache/conf/httpd.conf
           ├─12125 php-fpm: pool www
           ├─12126 php-fpm: pool www
           ├─12127 php-fpm: pool www
           ├─12132 php-fpm: pool www
           ├─12133 php-fpm: pool www
           ├─12134 php-fpm: pool www
           ├─12135 php-fpm: pool www
           ├─12136 php-fpm: pool www
           ├─12142 php-fpm: pool www
           ├─12143 php-fpm: pool www
           ├─26344 /opt/bitnami/apache/bin/httpd -f /opt/bitnami/apache/conf/httpd.conf
           └─26894 php-fpm: master process (/opt/bitnami/php/etc/php-fpm.conf)

Mar 31 09:47:38 ip-172-26-7-66 systemd[1]: bitnami.service: Found left-over process 9225 (php-fpm) in control group while starting unit. Ignoring.
Mar 31 09:47:38 ip-172-26-7-66 systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Mar 31 09:47:38 ip-172-26-7-66 systemd[1]: bitnami.service: Found left-over process 9226 (php-fpm) in control group while starting unit. Ignoring.
Mar 31 09:47:38 ip-172-26-7-66 systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Mar 31 09:47:38 ip-172-26-7-66 systemd[1]: bitnami.service: Found left-over process 9227 (php-fpm) in control group while starting unit. Ignoring.
Mar 31 09:47:38 ip-172-26-7-66 systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Mar 31 09:47:38 ip-172-26-7-66 systemd[1]: Starting LSB: bitnami init script...
Mar 31 09:47:38 ip-172-26-7-66 systemd[1]: bitnami.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Mar 31 09:47:38 ip-172-26-7-66 systemd[1]: bitnami.service: Failed with result 'exit-code'.
Mar 31 09:47:38 ip-172-26-7-66 systemd[1]: Failed to start LSB: bitnami init script.

Hi @gabrieldasilvamusic,

Thank you for sharing the bnsupport bundle. According to it, your server is running out of free memory, and it prevents Apache from starting.

-----------------------------------
Display amount of free and used memory in the system
-----------------------------------
Running: free -m
In: /opt/bitnami

Output:

              total        used        free      shared  buff/cache   available
Mem:            483         355           9           3         118         112
Swap:           634         315         319

You will need to use a bigger instance. Please note we recommend using an instance with at least 700 MB of free memory. Check the Lightsail official documentation on how to increase the instance type from the link below

https://aws.amazon.com/premiumsupport/knowledge-center/change-lightsail-plan/

I did start it manually… just not the shell script of the 3 of them.

It is indeed out of RAM.

What makes it go out of RAM? i’m jsut doing php small requests to the DB with an app they’re just plenty, there’s not even a website running.

Is it the php-fpm servers that use the ram? Would be great to understand exactly my application needs, hopefully there’s a way to find out.

Meanwhile I’m working on increasing this server capabilities, thanks.

Hi @gabrieldasilvamusic

Is it the php-fpm servers that use the ram? Would be great to understand exactly my application needs, hopefully there’s a way to find out.

You can use the following command to know more about which process are consuming more RAM:

$ ps -e -orss=,args= | sort -b -k1,1n | awk '{print $1,$2}'

This will show the memory usage of every running process, sorted in ascending order.

What makes it go out of RAM?

The more interactions the system has, the more RAM it needs to handle connections/requests smoothly. Nevertheless, you also have to bear in mind that apps need a minimum amount of RAM to work, and that your instance is running on low specs, so everything adds up to the equation.

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Thanks Jose you are great,
What did I do wrong here?

bitnami@ip-172-26-5-197:~$ $ ps -e -orss=,args= | sort -b -k1,1n | awk '{print $1,$2}'
-bash: $: command not found
bitnami@ip-172-26-5-197:~$

Hi @gabrieldasilvamusic

You should copy the command without the leading dollar ($) sign (it is just a common convention to say that whatever follows that sign is indeed a command and not regular text :slightly_smiling_face:)

So, although my textbox is:

$ ps -e -orss=,args= | sort -b -k1,1n | awk '{print $1,$2}'

You should copy/paste/execute the following in your system:

ps -e -orss=,args= | sort -b -k1,1n | awk '{print $1,$2}'

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Hello, need help please
my Bitnami support ticket : 2bbd6d91-9933-d797-8085-28fda2c62641

Hi @hassanetimbo2

Would you mind opening a new topic for this? We will be more than happy to help you there :slightly_smiling_face:

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

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