Случайная 500-я ошибка сервера с Puma после обновления до Rails 6, без логов или отзывов - PullRequest
0 голосов
/ 24 апреля 2020

Я не могу решить проблему.

  CACHE User Load (0.0ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 48063], ["LIMIT", 1]]
  CACHE UserProfile Load (0.0ms)  SELECT "user_profiles".* FROM "user_profiles" WHERE "user_profiles"."user_id" = $1 LIMIT $2  [["user_id", 48063], ["LIMIT", 1]]
  Rendered collection of contents/_author.html.haml [1 times] (Duration: 0.5ms | Allocations: 295)
  Rendered commentables/_comments_count.html.haml (Duration: 0.1ms | Allocations: 124)
  Section Load (0.2ms)  SELECT "sections".* FROM "sections" INNER JOIN "sectionable_sections" ON "sections"."id" = "sectionable_sections"."section_id" WHERE "sectionable_sections"."sectionable_id" = $1 AND "sectionable_sections"."sectionable_type" = $2 ORDER BY "sections"."position" ASC  [["sectionable_id", 35008], ["sectionable_type", "Content"]]
  Rendered contents/_article_teaser.html.haml (Duration: 4.4ms | Allocations: 2781)
  Rendering app/cells/products/index.html.haml
   (0.2ms)  SELECT MAX("products"."updated_at") FROM "products" WHERE "products"."state" = $1 AND "products"."published_at" <= '2020-04-24 10:10:03.771036'  [["state", "active"]]
   (1.3ms)  SELECT COUNT(*) FROM "products" WHERE "products"."state" = $1 AND "products"."published_at" <= '2020-04-24 10:10:03.771036'  [["state", "active"]]
  Product Load (1.1ms)  SELECT "products".* FROM "products" WHERE "products"."state" = $1 AND "products"."published_at" <= '2020-04-24 10:10:03.771036' ORDER BY "products"."published_at" DESC LIMIT $2  [["state", "active"], ["LIMIT", 10]]
  Rendered app/cells/products/_product_widget.html.haml (Duration: 1638.9ms | Allocations: 975442)
  Rendered app/cells/products/index.html.haml (Duration: 1643.5ms | Allocations: 976263)
  Rendered home/_aside_4.html.haml (Duration: 1644.2ms | Allocations: 976734)
  Rendered home/index.html.haml within layouts/application (Duration: 1941.8ms | Allocations: 1085299)
Completed 500 Internal Server Error in 1979ms (ActiveRecord: 155.0ms | Allocations: 1103473)

Иногда при разработке сервера Puma возникают ошибки. Я не развернул код на своем промежуточном сервере, но я беспокоюсь об этих ошибках.

Нет журнала, ничего. Если я выйду и перезапущу сервер, все в порядке, так что это не проблема кода. Есть идеи?

1 Ответ

0 голосов
/ 24 апреля 2020

Можете ли вы попробовать это в config/environments/development.rb и использовать:

##config/environments/development.rb
config.log_level = :debug ## add this line

Это должно по крайней мере дать вам какой-то обратный след, чтобы вы могли начать обнаруживать проблему.

...