Ever since I upgraded to Rails 6 and started using webpacker my memory consumption on boot (using heroku) has been disastrous.
It peaks at about 1200mb and then goes down afterwards and hangs steadily at approx. 512mb.
I've tried webpacker lazy loading and chunk splitting but to no avail.
Here's the log when I fetch a simple page for the first time after deploying a new build (and restarting dynos):
2019-11-29T07:28:35+00:00 app[heroku-redis]: source=CACHE_REDIS addon=redis-polished-49634 sample#active-connections=1 sample#load-avg-1m=0.11 sample#load-avg-5m=0.11 sample#load-avg-15m=0.135 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15664216kB sample#memory-free=12118360kB sample#memory-cached=942820kB sample#memory-redis=313912bytes sample#hit-rate=1 sample#evicted-keys=0
2019-11-29T07:29:14+00:00 app[heroku-postgres]: source=HEROKU_POSTGRESQL_RED addon=postgresql-metric-77832 sample#current_transaction=79756157 sample#db_size=134809762951bytes sample#tables=38 sample#active-connections=7 sample#waiting-connections=0 sample#index-cache-hit-rate=0.97867 sample#table-cache-hit-rate=0.93505 sample#load-avg-1m=0 sample#load-avg-5m=0 sample#load-avg-15m=0 sample#read-iops=0 sample#write-iops=0.083333 sample#tmp-disk-used=2376790016 sample#tmp-disk-available=70602002432 sample#memory-total=4044932kB sample#memory-free=153736kB sample#memory-cached=3543852kB sample#memory-postgres=21172kB
2019-11-29T07:29:49.838066+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/academy/lessons" host=app.makerspro.io request_id=75fae01f-ebe6-49f0-9635-ac92f64430da fwd="77.137.95.95" dyno=web.1 connect=0ms service=30001ms status=503 bytes=0 protocol=https
2019-11-29T07:29:53.946177+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=app.makerspro.io request_id=b2d726c1-7742-4556-9302-b3e88f699adb fwd="77.137.95.95" dyno=web.1 connect=0ms service=11ms status=200 bytes=207 protocol=https
Any ideas how I can get past it? Or at least not time out requests?
Set compile: false for production in webpacker.yml.
compile: true means: run webpack compilation during the request cycle, something you most likely do not want to do in production since you would instead precompile your assets.
Related
Really hoping some Meteor/Heroku experts can give some advises.
We have a MeteorJS app, hosted on Heroku. It is already using an expensive Professional M Dyno with a lot of memory capacity. But recently, at one point of time, it triggered a lot of H12 Request time out and then Heroku presented Application error page to all visitors.
This resolved after server is restarted. But we are running out of ideas on how to prevent this issue in the future.
We kind of confirmed that there was no obvious long running tasks, like email sending, files uploading.
And then, we can no longer trace deeper what happened right before the Application Error.
To make debugging even harder, even though we can see a lot of 30 seconds response time in the charts before the application error, it means nothing to us because we have seen these 30 seconds charts everyday. We understand that this is because Meteor is using socket connection which falls back to long polling and it is natural that a lot of 30 seconds response is recorded in the chart.
This is a snapshot of the router logs of the H12 errors:
366 <158>1 2022-06-15T06:20:35.674213+00:00 heroku router - - at=error code=H12 desc="Request timeout" method=POST path="/sockjs/859/upwpunj4/xhr" host=www.website.com request_id=dea10dbf-919a-440d-afbb-87f24d6b8bea fwd="37.19.205.195,172.70.222.217" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=http
373 <158>1 2022-06-15T06:20:45.911709+00:00 heroku router - - at=error code=H15 desc="Idle connection" method=GET path="/sockjs/696/qq_433yi/websocket" host=www.website.com request_id=761c71de-0f1f-4fac-ad31-db8aed615f54 fwd="151.192.225.202,172.70.92.184" dyno=web.1 connect=0ms service=3220877ms status=503 bytes= protocol=http
398 <158>1 2022-06-15T06:20:47.934103+00:00 heroku router - - at=error code=H15 desc="Idle connection" method=GET path="/sockjs/415/mk2hh_st/websocket" host=www.website.com request_id=633aa897-ebc2-4069-b201-6aacc36dc18b fwd="2404:e801:2001:1729:dd09:de8e:a8ff:7969,172.70.142.233" dyno=web.1 connect=0ms service=1720563ms status=503 bytes= protocol=http
394 <158>1 2022-06-15T06:20:48.584366+00:00 heroku router - - at=error code=H15 desc="Idle connection" method=GET path="/sockjs/037/5fz5sxeg/websocket" host=www.website.com request_id=253e05d2-76f4-4b53-ae74-3ad252084460 fwd="2001:f40:90f:ed3:d1ea:de0:28ba:c91,162.158.163.228" dyno=web.1 connect=0ms service=1225547ms status=503 bytes= protocol=http
340 <158>1 2022-06-15T06:20:50.298552+00:00 heroku router - - at=error code=H12 desc="Request timeout" method=GET path="/" host=www.website.com request_id=59cd33a6-e155-4645-9539-8eb2e759b915 fwd="176.9.151.26,172.68.50.111" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=http
430 <158>1 2022-06-15T06:20:54.99057+00:00 heroku router - - at=error code=H12 desc="Request timeout" method=GET path="/cfs/files/images/AmZNefJYyKWBLuBdb/04.png?token=eyJhdXRoVG9rZW4iOiIifQ%3D%3D&store=thumbs" host=www.website.com request_id=8e9bb915-ea06-4698-9cf6-15f311422c82 fwd="207.46.13.66,162.158.107.186" dyno=web.1 connect=0ms service=30001ms status=503 bytes=0 protocol=http
371 <158>1 2022-06-15T06:20:55.417353+00:00 heroku router - - at=error code=H12 desc="Request timeout" method=GET path="/?pg=news/20110628_182815&id=844" host=www.website.com request_id=3d7d0829-0922-4f63-b031-a407b2d97f0d fwd="192.99.15.34,108.162.241.9" dyno=web.1 connect=0ms service=30001ms status=503 bytes=0 protocol=http
Any guidance or tips is greatly appreciated.
I was trying to deploy my dashboard on heroku but after I finished I got Request timeout error
I got an Application error and search a lot but still have the same problem of time out and quota memory exceeded
Here is the error from the activity log:
2022-05-02T19:12:39.725777+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=ukraineinvasion.herokuapp.com request_id=fc485f9
6-0c39-416e-914a-93a3c9e1b6e8 fwd="41.46.189.30" dyno=web.1 connect=0ms service=30004ms status=503 bytes=0 protocol=https
2022-05-02T19:12:40.714784+00:00 app[web.1]: Dash is running on http://127.0.0.1:59351/
I have a problem with deploying Strapi application on Heroku. Both local and Heroku Strapi setups are using Postgres database.
Can't see any errors in Heroku logs, just a blank page in browser. Brpwser's console has these two errors:
Uncaught SyntaxError: Unexpected token '<' runtime~main.8073a043.js:1
Uncaught SyntaxError: Unexpected token '<' main.abbe0ac9.chunk.js:1
Heroku logs:
2020-12-11T15:26:03.986177+00:00 heroku[web.1]: State changed from starting to up
2020-12-11T15:26:03.916838+00:00 app[web.1]: INFO: Accepting connections at http://localhost:58777
2020-12-11T15:26:04.470749+00:00 heroku[router]: at=info method=GET path="/" host=john-strapi-postgres.herokuapp.com request_id=8783501f-3d9f-4986-bb44-6648a93d8105 fwd="68.82.27.99" dyno=web.1 connect=1ms service=24ms status=304 bytes=85 protocol=https
2020-12-11T15:26:04.561029+00:00 heroku[router]: at=info method=GET path="/admin/runtime~main.8073a043.js" host=john-strapi-postgres.herokuapp.com request_id=008157f5-a2ff-4738-9a8c-8ef4ac76a2d8 fwd="68.82.27.99" dyno=web.1 connect=1ms service=3ms status=304 bytes=85 protocol=https
2020-12-11T15:26:04.558537+00:00 heroku[router]: at=info method=GET path="/admin/main.abbe0ac9.chunk.js" host=john-strapi-postgres.herokuapp.com request_id=aa2e15a8-e001-4333-a195-f669ddcaac74 fwd="68.82.27.99" dyno=web.1 connect=1ms service=5ms status=304 bytes=85 protocol=https
2020-12-11T15:26:04.666249+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=john-strapi-postgres.herokuapp.com request_id=f2342dac-0347-4b0b-a4e4-89f0a425a98a fwd="68.82.27.99" dyno=web.1 connect=0ms service=6ms status=304 bytes=85 protocol=https
Local Strapi application runs perfectly fine.
Node v. 14.5.1
NPM v. 6.14.8
Strapi v. 3.3.4
Windows 10
I was trying to deploy my first web-app ( back end - Spring, front end - Angular2 ) to Heroku, but the front end doesn't work properly. This is what I see in logs.
2016-11-08T16:53:10.634253+00:00 heroku[router]: at=info method=GET path="/login.html" host=organazi.herokuapp.com request_id=86ff1936-97be-4cd1-abea-6553163c834f fwd="91.196.192.37" dyno=web.1 connect=1ms service=209ms status=200 bytes=1772
2016-11-08T16:53:11.003293+00:00 heroku[router]: at=info method=GET path="/node_modules/core-js/client/shim.min.js" host=organazi.herokuapp.com request_id=8ae3afe7-5721-41ef-9d80-d853ede55e07 fwd="91.196.192.37" dyno=web.1 connect=2ms service=231ms status=404 bytes=548
2016-11-08T16:53:11.110401+00:00 heroku[router]: at=info method=GET path="/systemjs.config.js" host=organazi.herokuapp.com request_id=ee743412-a577-4b4e-b5a0-1a6ed9cd5391 fwd="91.196.192.37" dyno=web.1 connect=1ms service=88ms status=200 bytes=2077
2016-11-08T16:53:11.096089+00:00 heroku[router]: at=info method=GET path="/node_modules/reflect-metadata/Reflect.js" host=organazi.herokuapp.com request_id=4954cbe7-832a-4e86-a37f-beb82fc3d567 fwd="91.196.192.37" dyno=web.1 connect=1ms service=70ms status=404 bytes=549
2016-11-08T16:53:11.116841+00:00 heroku[router]: at=info method=GET path="/node_modules/zone.js/dist/zone.js" host=organazi.herokuapp.com request_id=facea6c9-0c5c-4b68-8b7d-88347054bbd6 fwd="91.196.192.37" dyno=web.1 connect=1ms service=100ms status=404 bytes=542
2016-11-08T16:53:11.113024+00:00 heroku[router]: at=info method=GET path="/node_modules/systemjs/dist/system.src.js" host=organazi.herokuapp.com request_id=5605b488-0a21-49d8-8d71-ef3fd06288e4 fwd="91.196.192.37" dyno=web.1 connect=2ms service=93ms status=404 bytes=549
2016-11-08T16:53:11.271432+00:00 heroku[router]: at=info method=GET path="/node_modules/reflect-metadata/Reflect.js" host=organazi.herokuapp.com request_id=c4c5d13d-3311-4d8e-a46a-c14c59b03899 fwd="91.196.192.37" dyno=web.1 connect=6ms service=27ms status=404 bytes=549
2016-11-08T16:53:11.430986+00:00 heroku[router]: at=info method=GET path="/node_modules/systemjs/dist/system.src.js" host=organazi.herokuapp.com request_id=d8f8a2ba-5e10-4d55-8cd1-0c6b5388de26 fwd="91.196.192.37" dyno=web.1 connect=1ms service=38ms status=404 bytes=549
2016-11-08T16:53:11.613146+00:00 heroku[router]: at=info method=GET path="/systemjs.config.js" host=organazi.herokuapp.com request_id=1440d389-ecc9-4537-bcd2-19cc6146e453 fwd="91.196.192.37" dyno=web.1 connect=6ms service=21ms status=200 bytes=2077
2016-11-08T16:53:11.778848+00:00 heroku[router]: at=info method=GET path="/login/blue-sky-hd-wallpaper-2.jpg" host=organazi.herokuapp.com request_id=cd6a19c8-dbd0-4b68-926a-4c760bc9c3a9 fwd="91.196.192.37" dyno=web.1 connect=1ms service=17ms status=200 bytes=52476
Files like systemjs.config.js and image /login/blue-sky-hd-wallpaper-2.jpg loads fine, but there are some problems with loading node_modules. Sitting for 2 weeks with this problem.
My project - https://github.com/BarexaS/Constructed.git
In my Spring Boot and Angular2 setup I have similar issues. Unfortunately I have no solution yet. If you did not add the (generated) node_modules to your VCS (which you should not do anyway) heroku won't be able to detect automatically that your project also contains Node.js dependencies, even if your package.json is checked in. Consequently node_modules won't be available. There is the possiblity to tell heroku that your project is also Node.js based (by specifying it in the Procfile) but in the description heroku will expect that the package.json file is located in the root folder of the Spring Boot app. In my setup it is located in resources/static/js/ so I do not really know how to tell heroku that it first must install the dependencies by calling npm install in this folder.
After pushing on heroku my #Messages(value) are not interpreted:
--> value is display instead of the translation present in conf/Messages file.
I use play framework 2.2.1.
Here is the log of a start and a first display of a page containning #Messsages() use.
2014-10-12T05:37:14.320052+00:00 heroku[web.1]: State changed from down to starting
2014-10-12T05:37:14.320052+00:00 heroku[web.1]: Unidling
2014-10-12T05:37:24.363328+00:00 heroku[web.1]: Starting process with command `target/universal/stage/bin/kosh -Dhttp.port=41328 -DapplyEvolutions.default=true`
2014-10-12T05:37:25.260260+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Djava.rmi.server.useCodebaseOnly=true
2014-10-12T05:37:25.672105+00:00 app[web.1]: Play server process ID is 2
2014-10-12T05:37:27.084724+00:00 app[web.1]: [←[37minfo←[0m] play - database [default] connected at jdbc:h2:mem:play
2014-10-12T05:37:27.660047+00:00 app[web.1]: [←[37minfo←[0m] play - Application started (Prod)
2014-10-12T06:39:14.765169+00:00 heroku[router]: at=info method=GET path="/" host=mmmm.herokuapp.com request_id=31eeed7d-0b4d-43ac-b2df-3d142f6db4ba fwd="-" dyno=web.1 connect=1ms service=16ms status=200 bytes=34657
2014-10-12T06:39:14.939740+00:00 heroku[router]: at=info method=GET path="/assets/stylesheets/bootstrap.min.css" host=mmmm.herokuapp.com request_id=7ffe7b15-d521-481fb9f1-fba1c146fbf0 fwd="-" dyno=web.1 connect=1ms service=7ms status=304 bytes=173
2014-10-12T06:39:14.949590+00:00 heroku[router]: at=info method=GET path="/assets/stylesheets/normalize.css" host=mmmm.herokuapp.com request_id=4616036b-d3d3-4891-bc69-8c3461d69e26 fwd="-" dyno=web.1 connect=1ms service=8ms status=304 bytes=1732
2014-10-12T06:47:05.367842+00:00 heroku[router]: at=info method=GET path="/webjars/jquery/1.9.1/jquery.min.js" host=mmmm.herokuapp.com request_id=2938c0d1-62ad-4e43-acdb-1dc23588754f fwd="-" dyno=web.1 connect=1ms service=5ms status=304 bytes=173
My Procfile contains :
web: target/universal/stage/bin/kosh -Dhttp.port=$PORT -DapplyEvolutions.default=true
Changing the name of the file from "Messages" to "messages" (with a lowercase m) had fix the problem. On my Windows side file was case insensitive, on heroku side, in an Unix world, file names were case sensitives. Play framework seem to look for file in lower case at heroku.