for my point of sale I try to install ospos, on my computer I used the docker image and everything works fine, but when I deploy on Heroku following this steps :
Install the Heroku CLI
Download and install the Heroku CLI.
If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.
$ heroku login
Create a new Git repository
Initialize a git repository in a new or existing directory
$ cd my-project/
$ git init
$ heroku git:remote -a vente-a-domicile
Deploy your application
Commit your code to the repository and deploy it to Heroku using Git.
$ git add .
$ git commit -am "make it better"
$ git push heroku master
You can now change your main deploy branch from "master" to "main" for both manual and automatic deploys, please follow the instructions here.
Existing Git repository
For existing repositories, simply add the heroku remote
$ heroku git:remote -a vente-a-domicile
the page where my app is installed show the following message :
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
Heroku logs --tail
so I launch the command and get this result :
2022-10-29T21:24:40.812614+00:00 app[api]: Release v1 created by user codescooper#gmail.com
2022-10-29T21:24:40.812614+00:00 app[api]: Initial release by user codescooper#gmail.com
2022-10-29T21:24:40.957922+00:00 app[api]: Release v2 created by user codescooper#gmail.com
2022-10-29T21:24:40.957922+00:00 app[api]: Enable Logplex by user codescooper#gmail.com
2022-10-29T21:31:58.000000+00:00 app[api]: Build started by user codescooper#gmail.com
2022-10-29T21:32:07.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/42df0c38-6c04-4972-97d2-93821d2e9b63/activity/builds/2cb20d81-bfc3-4a9d-8808-b14f1db678ed
2022-10-29T21:38:09.000000+00:00 app[api]: Build started by user codescooper#gmail.com
2022-10-29T21:38:17.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/42df0c38-6c04-4972-97d2-93821d2e9b63/activity/builds/85f13e98-e3e3-4de7-9ede-29519171e35a
2022-10-31T21:48:41.178521+00:00 app[api]: Release v3 created by user codescooper#gmail.com
2022-10-31T21:48:41.178521+00:00 app[api]: Deployed web (1ca1d62ad467) by user codescooper#gmail.com
2022-10-31T21:48:41.195334+00:00 app[api]: Scaled to web#1:Free by user codescooper#gmail.com
2022-10-31T21:48:50.095189+00:00 heroku[web.1]: Starting process with command `apache2-foreground`
2022-10-31T21:48:51.083067+00:00 app[web.1]: AH00534: apache2: Configuration error: More than one MPM loaded.
2022-10-31T21:48:51.216874+00:00 heroku[web.1]: Process exited with status 1
2022-10-31T21:48:51.270570+00:00 heroku[web.1]: State changed from starting to crashed
2022-10-31T21:48:51.276875+00:00 heroku[web.1]: State changed from crashed to starting
2022-10-31T21:48:59.652673+00:00 heroku[web.1]: Starting process with command `apache2-foreground`
2022-10-31T21:49:00.634576+00:00 app[web.1]: AH00534: apache2: Configuration error: More than one MPM loaded.
2022-10-31T21:49:00.773706+00:00 heroku[web.1]: Process exited with status 1
2022-10-31T21:49:00.828894+00:00 heroku[web.1]: State changed from starting to crashed
2022-10-31T21:49:01.418603+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vente-a-domicile.herokuapp.com request_id=ea225fc8-bfd5-4956-ace7-65d90de1cf51 fwd="160.154.248.41" dyno= connect= service= status=503 bytes= protocol=https
2022-10-31T21:49:02.940239+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=vente-a-domicile.herokuapp.com request_id=2833440f-ccd9-4b0a-84f9-a3ef177f013d fwd="160.154.248.41" dyno= connect= service= status=503 bytes= protocol=https
Can you please explain how to solve it and make my app available?
thank u
Related
I have a Ruby on Rails site running on Heroku's performance-M dynamo, with autoscaling set up to 5 dynamos.
Recently, we have been receiving abrupt R15 and H12 errors on the site. During this, memory usage is shown well under the memory quota allowed for the dynamo.
Here are the errors shown in the log:
2019-09-16T10:12:08.523336+00:00 app[scheduler.2787]: Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/897302823996a945884a1d912c28d59520190916-4-1bn5w9k.jpg[0]' 2>/dev/null
2019-09-16T10:12:16.022212+00:00 heroku[scheduler.2787]: Process running mem=1022M(199.7%)
2019-09-16T10:12:16.022295+00:00 heroku[scheduler.2787]: Error R14 (Memory quota exceeded)
2019-09-16T10:12:16.365725+00:00 heroku[router]: at=info method=GET path="/favicon-16x16.png" host=www.site.com request_id=8755a947-ace9-471d-a192-a236785505b4 fwd="45.195.5.37" dyno=web.1 connect=1ms service=2ms status=200 bytes=928 protocol=https
2019-09-16T10:12:19.103405+00:00 heroku[scheduler.2787]: Process running mem=1279M(250.0%)
2019-09-16T10:12:19.103405+00:00 heroku[scheduler.2787]: Error R15 (Memory quota vastly exceeded)
2019-09-16T10:12:19.103405+00:00 heroku[scheduler.2787]: Stopping process with SIGKILL
2019-09-16T10:12:19.427029+00:00 heroku[scheduler.2787]: State changed from up to complete
2019-09-16T10:12:19.388039+00:00 heroku[scheduler.2787]: Process exited with status 137
2019-09-16T10:13:07.886016+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/favicon.ico" host=www.site.com request_id=c7cea0a2-7345-44c6-926e-3ad5a0eb2066 fwd="45.195.5.37" dyno=web.2 connect=1ms service=30000ms status=503 bytes=0 protocol=https
As you can see, just before the R15 error, paperclip was trying to compress an image.
The beginning of the graphs in the following screenshots show the status of Heroku Metrics for the affected period:
Heroku Metrics Part 1
Heroku Metrics Part 2
Can anyone please help me figure out how the R15 error, which is related to memory leakage occurring while the metrics show the memory well in the limit? Any help regarding how to stop this situation from repeating will be helpful.
Thanks.
Your R15 error occurred on a one-off dyno created by Heroku Scheduler, completely separate from your web dynos. Your request timeouts appear to be unrelated to the memory issues in your scheduled task.
The scheduled task appears to be running on a 1X dyno (mem=1022M(199.7%)). To change this, launch the Heroku Scheduler add-on and change the dyno type.
For your request timeouts, check out Scout or New Relic to find the problematic endpoint and where in the stack is taking so long.
My Rails application on Heroku shows me this error screen:
When I run heroku logs from my terminal it only shows:
2016-03-03T22:30:11.442364+00:00 heroku[router]: at=info method=POST path="/posts" host=www.mysite.com request_id=9b490b19-ca40-45b9-b09f-16a5b064d174 fwd="23.248.115.183" dyno=web.1 connect=2ms service=2271ms status=500 bytes=1754
How can I get the logs to show some actual information about the error (as they would in the development environment).
This error appeared after and update involving a mailer and sendgrid smtp.
If you have complete control over the Heroku setup then I can recommend hooking up the Rollbar Add-on to keep track of all your errors and their tracebacks. There is a free tier so you can try it first.
https://elements.heroku.com/addons/rollbar
You can tail the logs with:
heroku logs -t
If you have multiple apps from that directory:
heroku logs -t --app the-name-of-your-app
Those will give you tailings logs.
Here's Heroku's article on logging (with anchor to --tail):
https://devcenter.heroku.com/articles/logging#real-time-tail
Heroku Rails site going down every day or two for 30 seconds max, alerts sent by uptime-robot.
Have tried to run some basic load testing, and doesn't seem take the site down when under solid traffic. Not running any expensive queries on the homepage.
Error logs look like the below. Running rails on hobby dev.
Not getting any errors through New Relic. Running Puma 'puma', '~> 2.15.3'.
Have this set on rack timeout initailizer: Rack::Timeout.timeout = 15
Dec 07 20:14:46 sleepy-wave-3748 heroku/router: at=error code=H12 desc="Request timeout" method=GET path="/" host=mySiteUrlHere request_id=274ed877-2edb-43f2-8b77-c7a82f17109a fwd="69.162.124.231,108.162.221.131" dyno=web.1 connect=1ms service=30007ms status=503 bytes=0
Dec 07 20:35:46 sleepy-wave-3748 heroku/router: at=error code=H12 desc="Request timeout" method=HEAD path="/" host=mySiteUrlHere request_id=1b43b249-f089-4a4a-a42b-b2886d607fa8 fwd="69.162.124.231,108.162.221.131" dyno=web.1 connect=0ms service=30003ms status=503 bytes=0
Any Suggestions ?
Heroku will typically disconnect after 30 seconds and return a 503 error. It appears that your service may be responding successfully but after 30 seconds have passed. This could explain why you are not seeing application errors but are seeing Heroku errors.
EDIT: I think I may have misread your question. Heroku goes through a cycling process on some of its dynos. During this time, there may be a possibility for it to appear that your application has gone down. If you are using free dynos, they require a period of downtime (per rolling 24hr period)
I think I have solved it. I found a pull request in the Puma github account relating to this issue and noticed the fix had been included in a later version of Puma. After upgrading my Puma version, the problem has stopped happening. Hopefully this can help someone else out.
Note, I upgraded to Puma 2.15.3 from 2.11.2 .
I have a snippet of code that takes quite a while to run - About two minutes. Locally, when this code is initiated through a button in my view, the page just appears to be loading until the two minutes is up.
When I deployed this to heroku, the code was erroring out. I changed my Unicorn timeout time to allow for the code to finish, and now when looking at my logs the code is completing just fine.
However, I am presented with this error in my heroku app's view:
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
How can I get the same behavior I have locally on my heroku app? I would prefer that the page just continue to appear as if it were loading until the code is complete.
EDIT
I'm seeing this in my logs:
2014-01-14T17:11:49.388634+00:00 heroku[router]: at=error code=H12 desc="Request timeout"
method=POST path=/fluidsurveys/test_send_file host=glacial-spire-1431.herokuapp.com
fwd="66.195.31.22" dyno=web.1 connect=6ms service=30090ms status=503 bytes=0
repo at: git#github.com:assafshomer/sample_app.git
This app is my learning app based on Michael Hartl's excellent railstutorial.
App runs smoothly in development and test suite is all green
When deploying to Heroku I get the following error immediatly: "Application Error. An error occurred in the application and your page could not be served"
The problem started after upgrading to Rails4 (but I know the problem is not Rails4 itself because, e.g. git://github.com/railstutorial/sample_app_rails_4.git deploys fine to Heroku)
I know you are going to ask "did you migrate the db on Heroku?". I did. I even ran pg:reset and then again rake db:migrate on Heroku just in case. They seemed to have run ok.
Heroku logs don't give any info either (at least, nothing I can see as useful)
2013-05-25T22:11:26.070468+00:00 heroku[web.1]: Process exited with
status 0
2013-05-25T22:11:26.083572+00:00 heroku[web.1]: State changed from
starting to crashed
2013-05-25T22:13:09.372294+00:00 heroku[run.4121]: State changed from up
to complete
2013-05-25T22:13:09.357146+00:00 heroku[run.4121]: Process exited with
status 1
2013-05-25T22:13:50.829887+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path=/ host=devsampleapp.herokuapp.com
fwd="93.172.16.63" dyno= connect= service= status=503 bytes=
also the rails console doesn't come up:
2013-05-26T06:41:34.942569+00:00 heroku[api]: Starting process with command `bin/rails console` by assafshomer#gmail.com
2013-05-26T06:41:38.312107+00:00 heroku[run.5325]: Awaiting client
2013-05-26T06:41:38.339816+00:00 heroku[run.5325]: Starting process with command `bin/rails console`
2013-05-26T06:41:39.112396+00:00 heroku[run.5325]: Client connection closed. Sending SIGHUP to all processes
2013-05-26T06:41:40.329832+00:00 heroku[run.5325]: Process exited with status 0
2013-05-26T06:41:40.357047+00:00 heroku[run.5325]: State changed from starting to complete
I submitted a support ticket with Heroku, but that will only be attended to earliest Tuesday, and I'm itching to get this "upgrade to rails4" working already, so, any help in resolving this mystery will be much appreciated.
obviously, the best way to reproduce is to clone the repo and deploy to heroku :)
Thanks!!
Assaf Shomer (assafshomer at gmail)
In rails4 several files (bin/rails, bin/rake and bin/bundle) responsible for the startup phase have been newly added or moved from different locations (e.g. script/rails).
Seems that they are missing in your application. Strange thing indeed that it works on your local machine but not on heroku - but well I tried and added them. It seems to work.
You can create them by simply running rake rails:update:bin.