Fellow Julians : I was trying to put HoJ(Humans of Julia) bot on heroku, but memory quota exceeded issue keeps arising. Yeah, atleast with the free tier that’s the case.
Though I think in general it would be awesome to be able to deploy Julia APIs to Heroku, it really is a lot nicer than using AWS, especially for small projects. Also,lot of new users who want to try julia, heroku /netlify are much more accessible.
HoJ bot is new and comparatively small project as of now, so shouldn’t have had an issue like this in my opinion. We need some hacky tricks here lol or smart optimizations I guess
Heroku free tier has only 512mb in memorytotal
geniejl test app that works and says " hi!! there"
https://testgenieapp.herokuapp.com/
I found that example app from a tutorial https://towardsdatascience.com/deploying-julia-projects-on-heroku-com-eb8da5248134
See e.g. Deploying to Heroku with Buildpacks · Genie - The Highly Productive Julia Web Framework
What to do?
Relevant links:
- Humans of Julia · GitHub
- GitHub - Humans-of-Julia/HoJBot.jl: Yay, our own Discord bot!
- Version that builds succesfully on heroku: GitHub - ashwani-rathee/HOJBOT
- Fighting the Heroku `Error R14 (Memory quota exceeded)` issue. | by Douglas Liu | Sohoffice | Medium
- I have put some relevant logs below:
2021-05-15T08:07:32.000000+00:00 app[api]: Build started by user ab669522@gmail.com
2021-05-15T08:14:39.448377+00:00 app[api]: Deploy e282600d by user ab669522@gmail.com
2021-05-15T08:14:39.448377+00:00 app[api]: Release v5 created by user ab669522@gmail.com
2021-05-15T08:14:39.461252+00:00 app[api]: Scaled to web@1:Free by user ab669522@gmail.com
2021-05-15T08:14:55.000000+00:00 app[api]: Build succeeded
2021-05-15T08:15:15.116383+00:00 heroku[web.1]: Starting process with command `ENABLE_WARM_UP=0 script/run.sh`
2021-05-15T08:15:17.881502+00:00 app[web.1]: Sat 15 May 2021 08:15:17 AM UTC: Starting HoJBot...
2021-05-15T08:15:23.491540+00:00 app[web.1]: Precompiling project...
2021-05-15T08:15:25.691892+00:00 heroku[web.1]: Process running mem=513M(100.3%)
2021-05-15T08:15:25.695952+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2021-05-15T08:15:38.026418+00:00 app[web.1]: ✓ LibSSH2_jll
2021-05-15T08:15:40.537176+00:00 heroku[web.1]: Process running mem=1280M(250.0%)
2021-05-15T08:15:40.595135+00:00 heroku[web.1]: Error R15 (Memory quota vastly exceeded)
2021-05-15T08:15:40.600913+00:00 heroku[web.1]: Stopping process with SIGKILL
2021-05-15T08:15:40.626446+00:00 heroku[web.1]: Process running mem=917M(179.2%)
2021-05-15T08:15:40.751662+00:00 heroku[web.1]: Process exited with status 137
2021-05-15T08:15:40.823925+00:00 heroku[web.1]: State changed from starting to crashed
2021-05-15T08:15:40.835675+00:00 heroku[web.1]: State changed from crashed to starting
2021-05-15T08:16:10.958837+00:00 heroku[web.1]: Starting process with command `ENABLE_WARM_UP=0 script/run.sh`
2021-05-15T08:16:13.581186+00:00 app[web.1]: Sat 15 May 2021 08:16:13 AM UTC: Starting HoJBot...
2021-05-15T08:16:18.898049+00:00 app[web.1]: Precompiling project...
2021-05-15T08:16:21.692931+00:00 heroku[web.1]: Process running mem=520M(101.6%)
2021-05-15T08:16:21.695153+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2021-05-15T08:16:36.022114+00:00 app[web.1]: ✓ LibSSH2_jll
2021-05-15T08:16:36.918886+00:00 app[web.1]: ✓ LRUCache
2021-05-15T08:16:39.212718+00:00 heroku[web.1]: Process running mem=1280M(250.0%)
2021-05-15T08:16:39.356994+00:00 heroku[web.1]: Error R15 (Memory quota vastly exceeded)
2021-05-15T08:16:39.360248+00:00 heroku[web.1]: Stopping process with SIGKILL
2021-05-15T08:16:39.398651+00:00 heroku[web.1]: Process running mem=1003M(195.9%)
2021-05-15T08:16:39.453097+00:00 heroku[web.1]: Error R15 (Memory quota vastly exceeded)
2021-05-15T08:16:39.456142+00:00 heroku[web.1]: Stopping process with SIGKILL
2021-05-15T08:16:39.548497+00:00 heroku[web.1]: Process exited with status 137
2021-05-15T08:16:39.604996+00:00 heroku[web.1]: State changed from starting to crashed
2021-05-15T08:45:51.525249+00:00 heroku[web.1]: State changed from crashed to starting
2021-05-15T08:46:18.324906+00:00 heroku[web.1]: Starting process with command `ENABLE_WARM_UP=0 script/run.sh`
2021-05-15T08:46:20.648526+00:00 app[web.1]: Sat 15 May 2021 08:46:20 AM UTC: Starting HoJBot...
2021-05-15T08:46:26.026701+00:00 app[web.1]: Precompiling project...
2021-05-15T08:46:33.885659+00:00 heroku[web.1]: source=web.1 dyno=heroku.213526618.d0297e43-e320-4302-9296-0ff9ba2e068f sample#memory_total=902.38MB sample#memory_rss=447.63MB sample#memory_cache=0.12MB sample#memory_swap=454.62MB sample#memory_pgpgin=289848pages sample#memory_pgpgout=175224pages sample#memory_quota=512.00MB
2021-05-15T08:46:33.931085+00:00 heroku[web.1]: Process running mem=902M(176.2%)
2021-05-15T08:46:33.934188+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2021-05-15T08:46:35.096085+00:00 app[web.1]: ✓ LibSSH2_jll
2021-05-15T08:46:40.333850+00:00 heroku[web.1]: Process running mem=1279M(249.9%)
2021-05-15T08:46:40.594226+00:00 heroku[web.1]: Error R15 (Memory quota vastly exceeded)
2021-05-15T08:46:40.600974+00:00 heroku[web.1]: Stopping process with SIGKILL
2021-05-15T08:46:40.623293+00:00 heroku[web.1]: Process running mem=923M(180.4%)
2021-05-15T08:46:40.677844+00:00 heroku[web.1]: Error R15 (Memory quota vastly exceeded)
2021-05-15T08:46:40.681576+00:00 heroku[web.1]: Stopping process with SIGKILL
2021-05-15T08:46:40.794367+00:00 heroku[web.1]: Process exited with status 137
2021-05-15T08:46:40.868352+00:00 heroku[web.1]: State changed from starting to crashed
2021-05-15T08:46:40.876778+00:00 heroku[web.1]: State changed from crashed to starting
2021-05-15T08:47:20.422172+00:00 heroku[web.1]: Starting process with command `ENABLE_WARM_UP=0 script/run.sh`
2021-05-15T08:47:23.854809+00:00 app[web.1]: Sat 15 May 2021 08:47:23 AM UTC: Starting HoJBot...
2021-05-15T08:47:32.887358+00:00 app[web.1]: Precompiling project...
2021-05-15T08:47:42.730306+00:00 heroku[web.1]: source=web.1 dyno=heroku.213526618.d5201220-4b74-4f21-9fe0-95b70ba70160 sample#memory_total=845.57MB sample#memory_rss=511.88MB sample#memory_cache=0.12MB sample#memory_swap=333.57MB sample#memory_pgpgin=228850pages sample#memory_pgpgout=100334pages sample#memory_quota=512.00MB
2021-05-15T08:47:42.803320+00:00 heroku[web.1]: Process running mem=845M(165.1%)
2021-05-15T08:47:42.805894+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2021-05-15T08:47:59.119587+00:00 heroku[web.1]: source=web.1 dyno=heroku.213526618.d5201220-4b74-4f21-9fe0-95b70ba70160 sample#memory_total=953.70MB sample#memory_rss=511.83MB sample#memory_cache=0.09MB sample#memory_swap=441.78MB sample#memory_pgpgin=307986pages sample#memory_pgpgout=181021pages sample#memory_quota=512.00MB
2021-05-15T08:47:59.170387+00:00 heroku[web.1]: Process running mem=953M(186.3%)
2021-05-15T08:47:59.176075+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2021-05-15T08:48:17.141463+00:00 heroku[web.1]: source=web.1 dyno=heroku.213526618.d5201220-4b74-4f21-9fe0-95b70ba70160 sample#load_avg_1m=3.49
2021-05-15T08:48:17.186776+00:00 heroku[web.1]: source=web.1 dyno=heroku.213526618.d5201220-4b74-4f21-9fe0-95b70ba70160 sample#memory_total=938.26MB sample#memory_rss=478.76MB sample#memory_cache=0.39MB sample#memory_swap=459.11MB sample#memory_pgpgin=452950pages sample#memory_pgpgout=354304pages sample#memory_quota=512.00MB
2021-05-15T08:48:17.189448+00:00 heroku[web.1]: Process running mem=938M(183.2%)
2021-05-15T08:48:17.191342+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2021-05-15T08:48:16.980271+00:00 app[web.1]: ✓ LRUCache
2021-05-15T08:48:17.037826+00:00 app[web.1]: ✓ Grisu
2021-05-15T08:48:18.128215+00:00 app[web.1]: ✓ CompilerSupportLibraries_jll
2021-05-15T08:48:18.138368+00:00 app[web.1]: ✓ LibSSH2_jll
2021-05-15T08:48:20.797178+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2021-05-15T08:48:20.844899+00:00 heroku[web.1]: Stopping process with SIGKILL
2021-05-15T08:48:21.478180+00:00 heroku[web.1]: Process exited with status 137
2021-05-15T08:48:21.545752+00:00 heroku[web.1]: State changed from starting to crashed