Heroku: Почему я теряю память в течение дня - журналы ошибок? - PullRequest
1 голос
/ 07 ноября 2019

Любая помощь в поиске проблемы будет более чем оценена.

Мои метрики Heroku показывают "Превышена квота памяти: в текущем периоде времени было 2848 ошибок памяти." Использование памяти уменьшается до 256 МБ, а затем увеличивается до 512 МБ. Я не уверен, как долго это продолжается.

Я приложил журналы

2019-11-06T23:05:49.278423+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2019-11-06T23:06:11.508419+00:00 heroku[web.1]: Process running mem=561M(109.1%)
2019-11-06T23:06:11.508562+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2019-11-06T23:06:11.537488+00:00 heroku[router]: at=info method=GET path="/list/search?search=Olive+Oil" host=www.nzchemicalsuppliers.co.nz request_id=c7f01600-87e6-4b8c-8274-7baf460876de fwd="157.55.39.123" dyno=web.1 connect=1ms service=7ms status=301 bytes=260 protocol=http
2019-11-06T23:06:11.532280+00:00 app[web.1]: 10.45.9.232 - - [06/Nov/2019:23:06:11 UTC] "GET /list/search?search=Olive+Oil HTTP/1.1" 301 0
2019-11-06T23:06:11.534556+00:00 app[web.1]: - -> /list/search?search=Olive+Oil
2019-11-06T23:06:15.572013+00:00 heroku[router]: at=info method=GET path="/list/search?search=sodium+lauryl+sulphate" host=www.nzchemicalsuppliers.co.nz request_id=b57d22bc-8604-484b-b1f6-dc2ccf80589c fwd="157.55.39.123" dyno=web.1 connect=1ms service=3ms status=301 bytes=273 protocol=http
2019-11-06T23:06:15.570589+00:00 app[web.1]: 10.69.178.208 - - [06/Nov/2019:23:06:15 UTC] "GET /list/search?search=sodium+lauryl+sulphate HTTP/1.1" 301 0
2019-11-06T23:06:15.570613+00:00 app[web.1]: - -> /list/search?search=sodium+lauryl+sulphate
2019-11-06T23:06:18.831927+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916] Started GET "/list/search?search=20_litre+packaging+20" for 66.249.75.149 at 2019-11-06 23:06:18 +0000
2019-11-06T23:06:18.833082+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916] Processing by ListController#search as HTML
2019-11-06T23:06:18.833167+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   Parameters: {"search"=>"20_litre packaging 20"}
2019-11-06T23:06:18.838525+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlRedirect Exists (2.1ms)[0m  [1m[34mSELECT  1 AS one FROM "url_redirects" WHERE "url_redirects"."from" = $1 LIMIT $2[0m  [["from", "/list/search?search=20_litre+packaging+20"], ["LIMIT", 1]]
2019-11-06T23:06:18.842179+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mContent Load (2.0ms)[0m  [1m[34mSELECT  "contents".* FROM "contents" WHERE "contents"."id" = $1 LIMIT $2[0m  [["id", 2], ["LIMIT", 1]]
2019-11-06T23:06:18.846298+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mContent Load (1.8ms)[0m  [1m[34mSELECT  "contents".* FROM "contents" WHERE "contents"."url_slug" = $1 ORDER BY "contents"."id" ASC LIMIT $2[0m  [["url_slug", "search_page"], ["LIMIT", 1]]
2019-11-06T23:06:18.848059+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Content Load (0.0ms)[0m  [1m[34mSELECT  "contents".* FROM "contents" WHERE "contents"."url_slug" = $1 ORDER BY "contents"."id" ASC LIMIT $2[0m  [["url_slug", "search_page"], ["LIMIT", 1]]
2019-11-06T23:06:18.879169+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[35mSQL (26.7ms)[0m  [1m[34mSELECT "products"."id" AS t0_r0, "products"."name" AS t0_r1, "products"."other_names" AS t0_r2, "products"."company_id" AS t0_r3, "products"."created_at" AS t0_r4, "products"."updated_at" AS t0_r5, "products"."active" AS t0_r6, "products"."company_name" AS t0_r7, "products"."company_url" AS t0_r8, "companies"."id" AS t1_r0, "companies"."name" AS t1_r1, "companies"."active" AS t1_r2, "companies"."contact_name" AS t1_r3, "companies"."contact_phone" AS t1_r4, "companies"."location" AS t1_r5, "companies"."website" AS t1_r6, "companies"."created_at" AS t1_r7, "companies"."updated_at" AS t1_r8, "companies"."logo" AS t1_r9, "companies"."show_logo" AS t1_r10, "companies"."area" AS t1_r11, "companies"."email" AS t1_r12, "companies"."enable_enquiries" AS t1_r13, "companies"."show_supplier_link" AS t1_r14, "companies"."slug" AS t1_r15, "companies"."meta_description" AS t1_r16 FROM "products" LEFT OUTER JOIN "companies" ON "companies"."id" = "products"."company_id" WHERE ((1=1)  AND (upper(products.name) LIKE '20_LITRE PACKAGING 20%') AND (upper(products.name) LIKE '20_LITRE PACKAGING 20%') AND (upper(products.name) LIKE '20_LITRE PACKAGING 20%')) ORDER BY products.name ASC[0m
2019-11-06T23:06:18.905935+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[35mSQL (25.0ms)[0m  [1m[34mSELECT "products"."id" AS t0_r0, "products"."name" AS t0_r1, "products"."other_names" AS t0_r2, "products"."company_id" AS t0_r3, "products"."created_at" AS t0_r4, "products"."updated_at" AS t0_r5, "products"."active" AS t0_r6, "products"."company_name" AS t0_r7, "products"."company_url" AS t0_r8, "companies"."id" AS t1_r0, "companies"."name" AS t1_r1, "companies"."active" AS t1_r2, "companies"."contact_name" AS t1_r3, "companies"."contact_phone" AS t1_r4, "companies"."location" AS t1_r5, "companies"."website" AS t1_r6, "companies"."created_at" AS t1_r7, "companies"."updated_at" AS t1_r8, "companies"."logo" AS t1_r9, "companies"."show_logo" AS t1_r10, "companies"."area" AS t1_r11, "companies"."email" AS t1_r12, "companies"."enable_enquiries" AS t1_r13, "companies"."show_supplier_link" AS t1_r14, "companies"."slug" AS t1_r15, "companies"."meta_description" AS t1_r16 FROM "products" LEFT OUTER JOIN "companies" ON "companies"."id" = "products"."company_id" WHERE ((1=1)  AND (upper(products.name) LIKE '%20_LITRE%') AND (upper(products.name) LIKE '%PACKAGING%') AND (upper(products.name) LIKE '%20%')) ORDER BY products.name ASC[0m
2019-11-06T23:06:18.994728+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[35mSQL (86.0ms)[0m  [1m[34mSELECT "products"."id" AS t0_r0, "products"."name" AS t0_r1, "products"."other_names" AS t0_r2, "products"."company_id" AS t0_r3, "products"."created_at" AS t0_r4, "products"."updated_at" AS t0_r5, "products"."active" AS t0_r6, "products"."company_name" AS t0_r7, "products"."company_url" AS t0_r8, "companies"."id" AS t1_r0, "companies"."name" AS t1_r1, "companies"."active" AS t1_r2, "companies"."contact_name" AS t1_r3, "companies"."contact_phone" AS t1_r4, "companies"."location" AS t1_r5, "companies"."website" AS t1_r6, "companies"."created_at" AS t1_r7, "companies"."updated_at" AS t1_r8, "companies"."logo" AS t1_r9, "companies"."show_logo" AS t1_r10, "companies"."area" AS t1_r11, "companies"."email" AS t1_r12, "companies"."enable_enquiries" AS t1_r13, "companies"."show_supplier_link" AS t1_r14, "companies"."slug" AS t1_r15, "companies"."meta_description" AS t1_r16 FROM "products" LEFT OUTER JOIN "companies" ON "companies"."id" = "products"."company_id" WHERE ((1=1)  AND (upper(products.other_names) LIKE '%20_LITRE%') AND (upper(products.other_names) LIKE '%PACKAGING%') AND (upper(products.other_names) LIKE '%20%')) ORDER BY products.name ASC[0m
2019-11-06T23:06:19.002966+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[35mSQL (2.1ms)[0m  [1m[34mSELECT "products"."id" AS t0_r0, "products"."name" AS t0_r1, "products"."other_names" AS t0_r2, "products"."company_id" AS t0_r3, "products"."created_at" AS t0_r4, "products"."updated_at" AS t0_r5, "products"."active" AS t0_r6, "products"."company_name" AS t0_r7, "products"."company_url" AS t0_r8, "companies"."id" AS t1_r0, "companies"."name" AS t1_r1, "companies"."active" AS t1_r2, "companies"."contact_name" AS t1_r3, "companies"."contact_phone" AS t1_r4, "companies"."location" AS t1_r5, "companies"."website" AS t1_r6, "companies"."created_at" AS t1_r7, "companies"."updated_at" AS t1_r8, "companies"."logo" AS t1_r9, "companies"."show_logo" AS t1_r10, "companies"."area" AS t1_r11, "companies"."email" AS t1_r12, "companies"."enable_enquiries" AS t1_r13, "companies"."show_supplier_link" AS t1_r14, "companies"."slug" AS t1_r15, "companies"."meta_description" AS t1_r16 FROM "products" LEFT OUTER JOIN "companies" ON "companies"."id" = "products"."company_id" WHERE ((1=1)  AND (upper(companies.name) LIKE '%20_LITRE%') AND (upper(companies.name) LIKE '%PACKAGING%') AND (upper(companies.name) LIKE '%20%')) ORDER BY products.name ASC[0m
2019-11-06T23:06:19.006503+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[35mSQL (1.7ms)[0m  [1m[34mSELECT "products"."id" AS t0_r0, "products"."name" AS t0_r1, "products"."other_names" AS t0_r2, "products"."company_id" AS t0_r3, "products"."created_at" AS t0_r4, "products"."updated_at" AS t0_r5, "products"."active" AS t0_r6, "products"."company_name" AS t0_r7, "products"."company_url" AS t0_r8, "companies"."id" AS t1_r0, "companies"."name" AS t1_r1, "companies"."active" AS t1_r2, "companies"."contact_name" AS t1_r3, "companies"."contact_phone" AS t1_r4, "companies"."location" AS t1_r5, "companies"."website" AS t1_r6, "companies"."created_at" AS t1_r7, "companies"."updated_at" AS t1_r8, "companies"."logo" AS t1_r9, "companies"."show_logo" AS t1_r10, "companies"."area" AS t1_r11, "companies"."email" AS t1_r12, "companies"."enable_enquiries" AS t1_r13, "companies"."show_supplier_link" AS t1_r14, "companies"."slug" AS t1_r15, "companies"."meta_description" AS t1_r16 FROM "products" LEFT OUTER JOIN "companies" ON "companies"."id" = "products"."company_id" WHERE ((1=1)  AND (upper(companies.area) LIKE '%20_LITRE%') AND (upper(companies.area) LIKE '%PACKAGING%') AND (upper(companies.area) LIKE '%20%')) ORDER BY products.name ASC[0m
2019-11-06T23:06:19.029475+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[35mSQL (19.3ms)[0m  [1m[34mSELECT "products"."id" AS t0_r0, "products"."name" AS t0_r1, "products"."other_names" AS t0_r2, "products"."company_id" AS t0_r3, "products"."created_at" AS t0_r4, "products"."updated_at" AS t0_r5, "products"."active" AS t0_r6, "products"."company_name" AS t0_r7, "products"."company_url" AS t0_r8, "companies"."id" AS t1_r0, "companies"."name" AS t1_r1, "companies"."active" AS t1_r2, "companies"."contact_name" AS t1_r3, "companies"."contact_phone" AS t1_r4, "companies"."location" AS t1_r5, "companies"."website" AS t1_r6, "companies"."created_at" AS t1_r7, "companies"."updated_at" AS t1_r8, "companies"."logo" AS t1_r9, "companies"."show_logo" AS t1_r10, "companies"."area" AS t1_r11, "companies"."email" AS t1_r12, "companies"."enable_enquiries" AS t1_r13, "companies"."show_supplier_link" AS t1_r14, "companies"."slug" AS t1_r15, "companies"."meta_description" AS t1_r16 FROM "products" LEFT OUTER JOIN "companies" ON "companies"."id" = "products"."company_id" WHERE ((1=1)  AND (upper(products.company_name) LIKE '%20_LITRE%') AND (upper(products.company_name) LIKE '%PACKAGING%') AND (upper(products.company_name) LIKE '%20%')) ORDER BY products.name ASC[0m
2019-11-06T23:06:19.159297+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[35mSQL (127.2ms)[0m  [1m[34mSELECT "products"."id" AS t0_r0, "products"."name" AS t0_r1, "products"."other_names" AS t0_r2, "products"."company_id" AS t0_r3, "products"."created_at" AS t0_r4, "products"."updated_at" AS t0_r5, "products"."active" AS t0_r6, "products"."company_name" AS t0_r7, "products"."company_url" AS t0_r8, "companies"."id" AS t1_r0, "companies"."name" AS t1_r1, "companies"."active" AS t1_r2, "companies"."contact_name" AS t1_r3, "companies"."contact_phone" AS t1_r4, "companies"."location" AS t1_r5, "companies"."website" AS t1_r6, "companies"."created_at" AS t1_r7, "companies"."updated_at" AS t1_r8, "companies"."logo" AS t1_r9, "companies"."show_logo" AS t1_r10, "companies"."area" AS t1_r11, "companies"."email" AS t1_r12, "companies"."enable_enquiries" AS t1_r13, "companies"."show_supplier_link" AS t1_r14, "companies"."slug" AS t1_r15, "companies"."meta_description" AS t1_r16 FROM "products" LEFT OUTER JOIN "companies" ON "companies"."id" = "products"."company_id" WHERE ((1=1)  AND (upper(products.name) LIKE '%20_LITRE%' OR upper(products.other_names) LIKE '%20_LITRE%' or upper(companies.name) LIKE '%20_LITRE%' or upper(companies.area) LIKE '%20_LITRE%') AND (upper(products.name) LIKE '%PACKAGING%' OR upper(products.other_names) LIKE '%PACKAGING%' or upper(companies.name) LIKE '%PACKAGING%' or upper(companies.area) LIKE '%PACKAGING%') AND (upper(products.name) LIKE '%20%' OR upper(products.other_names) LIKE '%20%' or upper(companies.name) LIKE '%20%' or upper(companies.area) LIKE '%20%')) ORDER BY products.name ASC[0m
2019-11-06T23:06:19.165976+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   Rendering list/search.html.erb within layouts/application
2019-11-06T23:06:19.169205+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.6ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "a"], ["LIMIT", 1]]
2019-11-06T23:06:19.171653+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.2ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "b"], ["LIMIT", 1]]
2019-11-06T23:06:19.174728+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.3ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "c"], ["LIMIT", 1]]
2019-11-06T23:06:19.176851+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.2ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "d"], ["LIMIT", 1]]
2019-11-06T23:06:19.179044+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.3ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "e"], ["LIMIT", 1]]
2019-11-06T23:06:19.181084+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.2ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "f"], ["LIMIT", 1]]
2019-11-06T23:06:19.183162+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.3ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "g"], ["LIMIT", 1]]
2019-11-06T23:06:19.185220+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.2ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "h"], ["LIMIT", 1]]
2019-11-06T23:06:19.187257+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.1ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "i"], ["LIMIT", 1]]
2019-11-06T23:06:19.189302+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.2ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "j"], ["LIMIT", 1]]
2019-11-06T23:06:19.191419+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.3ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "k"], ["LIMIT", 1]]
2019-11-06T23:06:19.193432+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.2ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "l"], ["LIMIT", 1]]
2019-11-06T23:06:19.196123+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.8ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "m"], ["LIMIT", 1]]
2019-11-06T23:06:19.198330+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.3ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "n"], ["LIMIT", 1]]
2019-11-06T23:06:19.201841+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (2.6ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "o"], ["LIMIT", 1]]
2019-11-06T23:06:19.204019+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.3ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "p"], ["LIMIT", 1]]
2019-11-06T23:06:19.206027+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.2ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "q"], ["LIMIT", 1]]
2019-11-06T23:06:19.208547+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.7ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "r"], ["LIMIT", 1]]
2019-11-06T23:06:19.213817+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (4.4ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "s"], ["LIMIT", 1]]
2019-11-06T23:06:19.218069+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (2.3ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "t"], ["LIMIT", 1]]
2019-11-06T23:06:19.223322+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.4ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "u"], ["LIMIT", 1]]
2019-11-06T23:06:19.226364+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.5ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "v"], ["LIMIT", 1]]
2019-11-06T23:06:19.229552+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.4ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "w"], ["LIMIT", 1]]
2019-11-06T23:06:19.232934+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.5ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "x"], ["LIMIT", 1]]
2019-11-06T23:06:19.235729+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (1.3ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "y"], ["LIMIT", 1]]
2019-11-06T23:06:19.242161+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mUrlItem Load (5.1ms)[0m  [1m[34mSELECT  "url_items".* FROM "url_items" WHERE "url_items"."slug" = $1 ORDER BY "url_items"."id" ASC LIMIT $2[0m  [["slug", "z"], ["LIMIT", 1]]
2019-11-06T23:06:19.243450+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   Rendered includes/_search.html.erb (77.0ms)
2019-11-06T23:06:19.281127+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mSetting Load (36.9ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.284426+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   Rendered includes/_enquiry_modal.html.erb (0.1ms)
2019-11-06T23:06:19.285496+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.286109+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.286757+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.287338+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.299435+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[35m (10.2ms)[0m  [1m[34mSELECT COUNT(*) FROM "products" WHERE "products"."company_id" = $1[0m  [["company_id", 209]]
2019-11-06T23:06:19.300193+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.301254+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.306744+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.308413+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.308467+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.314453+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.316544+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[35mCACHE  (0.0ms)[0m  [1m[34mSELECT COUNT(*) FROM "products" WHERE "products"."company_id" = $1[0m  [["company_id", 209]]
2019-11-06T23:06:19.317021+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.320292+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.322974+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.1ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.323724+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.324372+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.325057+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.337687+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[35m (10.4ms)[0m  [1m[34mSELECT COUNT(*) FROM "products" WHERE "products"."company_id" = $1[0m  [["company_id", 292]]
2019-11-06T23:06:19.338275+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.339041+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.340498+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.341021+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.341508+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.341964+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.342960+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[35mCACHE  (0.0ms)[0m  [1m[34mSELECT COUNT(*) FROM "products" WHERE "products"."company_id" = $1[0m  [["company_id", 209]]
2019-11-06T23:06:19.343327+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.343940+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.345260+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.345842+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.346300+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.346731+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.358789+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[35m (10.8ms)[0m  [1m[34mSELECT COUNT(*) FROM "products" WHERE "products"."company_id" = $1[0m  [["company_id", 107]]
2019-11-06T23:06:19.359446+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.360168+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.361659+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.362178+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.362638+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.363074+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[36mCACHE Setting Load (0.0ms)[0m  [1m[34mSELECT  "settings".* FROM "settings" WHERE "settings"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2019-11-06T23:06:19.364066+00:00 app[web.1]: [d5fbbd9d-3e4a-488c-8e02-beca6b8e8916]   [1m[35mCACHE  (0.0ms)[0m  [1m[34mSELECT COUNT(*) FROM "products" WHERE "products"."company_id" = $1[0m  [["company_id", 292]]```






1 Ответ

0 голосов
/ 07 ноября 2019

Возможно, вы заметили, что в ruby ​​вы никогда не освобождаете память. Вместо этого есть сборщик мусора, который должен идентифицировать неиспользуемые объекты и освободить их.

Возможно, сборщик мусора не работает. Вы можете определить, сколько раз GC работал, вызывая GC.count, GC.stat[:minor_gc_count] и GC.stat[:major_gc_count]. Вы можете вызвать это для своего производственного приложения Heroku, запустив консоль с помощью следующей команды:

heroku run rails c --remote production
GC.stat

Это также происходит с нашим приложением, и я не нашел решения.

Iнашел статью Что вызывает вздутие памяти Ruby? , которая рекомендует установить MALLOC_ARENA_MAX=2, и обновлен до ruby 2.6.

heroku config:add MALLOC_ARENA_MAX=2 --remote production

Я не виделбольшая разница для моего приложения.

Статья переменные среды ruby-memory-memory-simple-than-они-look помогла с простым способом настройки некоторых параметров сборки мусора, но онисвязано с тем, сколько памяти выделено за раз, что не сильно помогает.

Есть планы на ruby 2.7 иметь команду GC.compact, которую я с нетерпением жду помощи.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...