简体   繁体   中英

Problem with Puma server in Development - Completed 500 Internal Server Error

Ok so I have been researching a lot since I got this problem. It´sa newly started project with the latest ruby and rails version. It´s something wrong with my server but it´s not showing any error messages. It worked fine then stopped working suddenly.

It might have something to do with me updating from puma 4.2.1 to 4.3.1 but tried to downgrade and no change.

My other (older) projects are working fine.

When going to localhost:3000 I get: We're sorry, but something went wrong. If you are the application owner check the logs for more information.

=> Booting Puma
=> Rails 6.0.2.1 application starting in development 
=> Run `rails server --help` for more startup options
Puma starting in single mode...
* Version 4.3.1 (ruby 2.6.5-p114), codename: Mysterious Traveller
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://127.0.0.1:3000
* Listening on tcp://[::1]:3000
Use Ctrl-C to stop
Started GET "/" for 127.0.0.1 at 2020-01-16 17:05:42 +0100
   (0.6ms)  SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
Processing by IndexController#index as HTML
  Rendering index/index.html.erb within layouts/application
  Category Load (0.5ms)  SELECT "categories".* FROM "categories" ORDER BY name ASC
  ↳ app/views/index/index.html.erb:7
  Brand Load (0.4ms)  SELECT "brands".* FROM "brands" ORDER BY name ASC
  ↳ app/views/index/index.html.erb:12
  Rendered index/index.html.erb within layouts/application (Duration: 34.3ms | Allocations: 6454)
Completed 500 Internal Server Error in 48ms (ActiveRecord: 4.5ms | Allocations: 9079)

You run the server, then it receives a request but malfunctions. You need to see what is happening when the request is received. Your next step should be to check the server logs on your production:

bundle exec tail -f log/production.log

This seems like an XY problem ie after you see the logs, you will realize that the problem is something else, most probably not puma itself as 500 is internal server error code ie something went wrong in your application's server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM