Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An unhandled lowlevel error occurred. The application logs may have details

I'm tyring to deploy a rails app to a digital ocean droplet and all seems to be configured ok but I get this error:

An unhandled lowlevel error occurred. The application logs may have details.

I'm not sure what to do as the logs are empty.

Here's the nginx config:

upstream puma {
  server unix:///home/yourcv.rocks/shared/tmp/sockets/yourcv.rocks-puma.sock;
}

server {
  listen 80 default_server deferred;
  server_name 127.0.0.1;

  root /home/yourcv.rocks/current/public;
  access_log /home/yourcv.rocks/current/log/nginx.access.log;
  error_log /home/yourcv.rocks/current/log/nginx.error.log info;

  location ^~ /assets/ {
    gzip_static on;
    expires max;
    add_header Cache-Control public;
  }

  try_files $uri/index.html $uri @puma;
  location @puma {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;

    proxy_pass http://puma;
  }

  error_page 500 502 503 504 /500.html;
  client_max_body_size 10M;
  keepalive_timeout 10;
}

Thank you! :)

like image 868
Tudor S. Avatar asked May 09 '16 09:05

Tudor S.


People also ask

Why are the application logs showing unhandled lowlevel error?

The application logs may have details – Read For Learn An unhandled lowlevel error occurred. The application logs may have details This is because you haven’t set your secret key correctly. Double check your config/secrets.yml file: It should be something like this:

Why did I get an unhandled low level error in Salesforce?

An unhandled lowlevel error occurred. The application logs may have details – Read For Learn An unhandled lowlevel error occurred. The application logs may have details This is because you haven’t set your secret key correctly. Double check your config/secrets.yml file: It should be something like this:

What to do when you get an unhandled low level error?

An unhandled lowlevel error occurred. The application logs may have details. When you see an error message, the very first thing you should do is to check your log files. I did the same thing! I looked at nginx.error.log, production.log, and puma.error.log.

What does unhandled exception has occurred in your application mean?

The ‘unhandled exception has occurred’ error is not associated with a particular app, which makes it that much harder to resolve. Some users also see an error that says — Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue.


1 Answers

This is because you haven't set your secret key correctly. Double check your config/secrets.yml file: It should be something like this:

production: secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

Then in your droplet, you can run bundle exec rake secret to get your secret key. There are options like dotenv which is a useful gem that loads the contents of a .env file into ENV.

like image 130
pyfl88 Avatar answered Oct 05 '22 23:10

pyfl88