My application is crashing again and again. I am using the hosting services of digital ocean the status of the server are also displayed in the image (It start working when I restart the server but that is not the solution. After sometime it again crashes.) Apache log.error shows:
[ 2016-07-05 16:40:39.2615 1768/7ff87c09b700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/abc/kbs: An er$
Error ID: b1aaad3d
Error details saved to: /tmp/passenger-error-ygdDZS.html
Message from application: An error occurred while starting the web application. It exited before signalling successful startup back to Phusion$
<h2>Raw process output:</h2>
(empty)
App 21534 stdout: ^[[1m^[[35mCategoryProduct Load (23.0ms)^[[0m SELECT "category_products".* FROM "category_products" WHERE "category_product$
App 21534 stdout: ^[[1m^[[36m (0.5ms)^[[0m ^[[1mSELECT "category_products"."name" FROM "category_products" WHERE "category_products"."product$
terminate called after throwing an instance of 'Passenger::SystemException'
App 21534 stdout: ^[[1m^[[35mCACHE (0.3ms)^[[0m SELECT "countries".* FROM "countries" WHERE "countries"."id" = $1 ORDER BY name LIMIT 1 [[$
what(): Cannot fork a new process: Cannot allocate memory (errno=12)
ERROR: cannot fork a process for executing 'tee'
[ pid=1768, timestamp=1467751239 ] Process aborted! signo=SIGABRT(6), reason=SI_TKILL, signal sent by PID 1768 with UID 0, si_addr=0x6e8, random$
[ pid=1768 ] Could not create crash log file, so dumping to stderr only.
[ pid=1768 ] Could fork a child process for dumping diagnostics: fork() failed with errno=12
Content of the file /tmp/passenger-error-ygdDZS.html are below.
An error occurred while starting the web application. It exited before signalling successful startup back to Phusion Passenger. Please read this article for more information about this problem.
Raw process output:
(empty)
Error ID
b1aaad3d
Application root
/home/abc_user/app_name
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV, NODE_ENV and PASSENGER_APP_ENV)
production
Ruby interpreter command
/usr/bin/passenger_free_ruby
User and groups
uid=1000(abc_user) gid=1000(abc_user) groups=1000(abc_user),27(sudo)
Environment variables
APACHE_PID_FILE=/var/run/apache2/apache2.pid
SHELL=/bin/bash
APACHE_RUN_USER=www-data
PASSENGER_DEBUG_DIR=/tmp/passenger.spawn-debug.XXXXijaXyT
USER=abc_user
PASSENGER_USE_FEEDBACK_FD=true
APACHE_LOG_DIR=/var/log/apache2
PATH=/home/abc_user/.rbenv/plugins/ruby-build/bin:/home/abc_user/.rbenv/shims:/home/abc_user/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/home/abc_user/app_name
APACHE_RUN_GROUP=www-data
LANG=C
NODE_PATH=/usr/share/passenger/node
RBENV_SHELL=bash
SHLVL=0
HOME=/home/abc_user
LOGNAME=abc_user
SERVER_SOFTWARE=Apache/2.4.7 (Ubuntu) Phusion_Passenger/5.0.26
APACHE_LOCK_DIR=/var/lock/apache2
APACHE_RUN_DIR=/var/run/apache2
IN_PASSENGER=1
PYTHONUNBUFFERED=1
RAILS_ENV=production
RACK_ENV=production
WSGI_ENV=production
NODE_ENV=production
PASSENGER_APP_ENV=production
SCRIPT_URL=/products/spray-paints-hand-tools
SCRIPT_URI=https://www.domain.com/products/name_of_brand
HTTPS=on
SSL_TLS_SNI=www.domain.com
Ulimits
Unknown
System metrics
------------- General -------------
Kernel version : 3.13.0-79-generic
Uptime : 8h 41m 28s
Load averages : 4.03%, 2.24%, 0.96%
Fork rate : unknown
------------- CPU -------------
Number of CPUs : 2
Average CPU usage : 100% -- 100% user, 0% nice, 0% system, 0% idle
CPU 1 : 100% -- 100% user, 0% nice, 0% system, 0% idle
CPU 2 : 100% -- 100% user, 0% nice, 0% system, 0% idle
I/O pressure : 0%
CPU 1 : 0%
CPU 2 : 0%
Interference from other VMs: 0%
CPU 1 : 0%
CPU 2 : 0%
------------- Memory -------------
RAM total : 2001 MB
RAM used : 1879 MB (94%)
RAM free : 122 MB
Swap total : 0 MB
Swap used : 0 MB (-nan%)
Swap free : 0 MB
Swap in : unknown
Swap out : unknown
Some information about my server is
Server version: Apache/2.4.7 (Ubuntu)
Server built: Jan 14 2016 17:45:23
Phusion Passenger 5.0.26
Memory(Ram) 2GB Disc Space 40Gb