Puma server dies with no reason - ruby

I'm running Puma 2.8.2 server for stubbing some of my back end services. Occasionally Puma server just dies without any reason.
There is no errors in error.log And here is excerpt from access.log:
10.210.140.21 - - [15/Oct/2014 09:28:22] "GET /status HTTP/1.1" 200 - 0.0030
- Gracefully stopping, waiting for requests to finish
- Goodbye!
=== puma startup: 2014-10-15 09:28:24 +0100 ===
10.210.140.21 - - [15/Oct/2014 09:28:24] "GET /status HTTP/1.1" 200 - 0.0254
Any thoughts what could cause this?

If this problem is becoming in Heroku and you are using Heroku free dyno, the problem is that you use the free dyno. Because your app goes to sleep after 30 minutes of inactivity.
You can find more info at the following link:
https://devcenter.heroku.com/articles/free-dyno-hours

Related

Local development with Google App Engine go111 using dev_appserver is slow

I am locally running a GAE go111 program using dev_appserver.py on a reasonably fast Windows10 desktop. I have to use dev_appserver as I'm running in classic compatibility mode by calling
appengine.Main()
I have an end point that I install using
http.HandleFunc("/TC/", handleTestConnection)
This endpoint has no code in it
func handleTestConnection(w http.ResponseWriter, r *http.Request) {
}
Each time I try to access this endpoint using...
http://127.0.0.1:8080/TC/
...it takes ~2 seconds to respond. This happens on all endpoints regardless of warmup or complexity. This is not a first run problem, it will happen each time I call the endpoint.
The logs from dev_appserver are as follows...
DEBUG 2021-09-24 19:14:10,460 module.py:1499] Dispatching request to <Instance 9cca95d2ec7bedafddd44639c7e2cd139bfc: 0/8, total: 1> after 0.0000s pending
DEBUG 2021-09-24 19:14:12,490 <string>:134] API server executing remote_api_pb.Request:
service_name: "logservice"
method: "Flush"
request: "\n\000"
request_id: "uumGeJVDum"
DEBUG 2021-09-24 19:14:12,492 <string>:194] API server responding with remote_api_pb.Response:
DEBUG 2021-09-24 19:14:12,492 <string>:493] Handled logservice.Flush in 0.0020
DEBUG 2021-09-24 19:14:12,493 instance.py:410] Request handled by <Instance 9cca95d2ec7bedafddd44639c7e2cd139bfc: 1/8, total: 2> in 2.0320s
INFO 2021-09-24 19:14:12,493 module.py:883] default: "GET /TC/ HTTP/1.1" 200 -
INFO 2021-09-24 19:14:12,516 module.py:883] default: "GET /favicon.ico HTTP/1.1" 200 1150
Everything works correctly and fast once deployed to a Google app engine server, it's just local development that is slow.
I have tried numerous options of dev_appserver including...
--logs_path
--dev_appserver_log_level
--log_level
--threadsafe_override
--max_module_instances
--datastore_consistency_policy
--enable_host_checking
I have tried running natively using
go run .
But as this is in classic compatibility mode this does not work.
I have tried turning off virus checkers / firewalls. Other browsers. Using localhost. Other ports. 3 completely different desktops. Using host=0.0.0.0 then my local ip. All result in the same delay.
Has anyone hit and solved this problem?

Taskqueue tasks not executing in dev server

I have enqueued tasks to local taskqueue server using the google task queue library google.golang.org/appengine/taskqueue. But the execution is failing with the following error:
INFO 2021-05-24 09:28:13,310 module.py:865] default: "POST /endpoint HTTP/1.1" 409 104
WARNING 2021-05-24 09:28:13,310 taskqueue_stub.py:2149] Task task36 failed to execute. This task will retry in 204.800 seconds
Is there some config in dev server that i need to configure for this to work? The same is working on production environment, but only dev server has this problem
I'm using Go version 1.11.13

Guacamole ,Failed to load resource: the server responded with a status of 403 (Forbidden)

I'm facing same problem as 'https://stackoverflow.com/questions/33499048/the-user-mapping-xml-file-doesnt-work-in-guacamole-invalid-login#'
However, it doesn't solve my problem so far.
Mine is guacamole-client-1.0.0 on tomcat 7.0.76 and CentOS 7.8.2003.
I did ln -s /etc/guacamole/ /usr/share/tomcat/.guacamole and restart tomcat
Then,google Chrome shows.
`Failed to load resource: the server responded with a status of 403 (Forbidden) http://10.0.3.13:8080/guacamole-1.0.0/api/tokens`
I need farther information to fix the problem.
This is a message in log.
10.0.20.111 - - [23/Jun/2020:21:15:44 +0900] "GET /guacamole-1.0.0/api/tokens HTTP/1.1" 500 183
As I commented,I made misspelling in user-mapping.xml.
After I fix the error,guacamole goes forward.

magento logs out everytime I run an import

Everytime I run an import profile in Magento after about 2 - 3 minutes it logs me out. I have checked the apache error logs, this is the lead up to the log out:
[13/Sep/2012:14:58:41 +0100] "POST /index.php/admin/system_convert_gui/batchRun/key/151d60f07b9e68b0023da294f315c3cc/?isAjax=true HTTP/1.1" 200 52
[13/Sep/2012:14:58:42 +0100] "POST /index.php/admin/system_convert_gui/batchRun/key/151d60f07b9e68b0023da294f315c3cc/?isAjax=true HTTP/1.1" 200 52
[13/Sep/2012:14:58:44 +0100] "POST /index.php/admin/system_convert_gui/batchRun/key/151d60f07b9e68b0023da294f315c3cc/?isAjax=true HTTP/1.1" 200 148
[13/Sep/2012:14:58:44 +0100] "GET /index.php/admin/index/login/key/70f0f08a622f871979b3890c5f769bf4/ HTTP/1.1" 200 1001
In the system log I get:
2012-09-13T14:13:00+00:00 DEBUG (7): Cannot send headers; headers already sent in /var/www/vhosts/httpdocs/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php, line 278
2012-09-13T14:13:00+00:00 DEBUG (7): HEADERS ALREADY SENT: [0] /var/www/vhosts/httpdocs/app/code/core/Mage/Core/Controller/Response/Http.php:44
Nothing in the exception log. I have researched the headers already sent issue but nothing has fixed this. Any suggestions would be greatly appreciated.
Magento version 1.4.0.1
It's an annoyance. I get it on ee 1.8 during any import/export process that counts the items processed as it goes.
I solved it by adding ob_start() just before that line throwing the error.
I realize I should override the function, but I'm using an old version and will upgrade soon. Hopefully this is fixed in 1.12

Ruby crashes on windows

I'm facing same problem described here: why-rails-fails-with-ruby-exe-has-encountered-a-problem-and-needs-to-close. that is ruby get crashed with following error:
ruby.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
I'm asking this to add some details on it as that question was not asked by me I am not able to add information in it. So this is not duplicate.
Ruby crashes eventually no matter how I run it (in development or in production), but it seems to crash more often in production mode. Sometimes it will crash when I hold down the F5 key, but sometimes I have to hold and release it intermittently for a minute or two. It appears to be very dependent on timing, but I can usually make it crash in less than 60 seconds.
When I refresh the GET request is sent for 3 times as follows:
Started GET "/app/page" for 127.0.0.1 at 2011-02-23 10:57:35 +0530
Processing by AppController#page as HTML
Rendered pms/dashboard.html.erb within layouts/application (109.4ms)
Completed 200 OK in 141ms (Views: 140.6ms | ActiveRecord: 0.0ms)
Started GET "/app/page" for 127.0.0.1 at 2011-02-23 10:57:35 +0530
Processing by AppController#page as */*
Rendered pms/dashboard.html.erb within layouts/application (15.6ms)
Completed 200 OK in 187ms (Views: 187.5ms | ActiveRecord: 0.0ms)
Started GET "/app/page" for 127.0.0.1 at 2011-02-23 10:57:35 +0530
Processing by AppController#page as */*
Rendered pms/dashboard.html.erb within layouts/application (15.6ms)
Completed 200 OK in 219ms (Views: 218.7ms | ActiveRecord: 0.0ms)
And if I rapidly refresh the page get following error in one of or all the 3 request:
ERROR Errno:ECONNABORTED: An established connection was aborted by the software in your host machine:
c:/Ruby/lib/1.9.1/webrick/httpresponse.rb:323:in 'write'
c:/Ruby/lib/1.9.1/webrick/httprespose.rb:323:in '<<'
c:/Ruby/lib/1.9.1/webrick/httprespose.rb:323:in '_write_data'
c:/Ruby/lib/1.9.1/webrick/httprespose.rb:295:in 'send_body_string'
c:/Ruby/lib/1.9.1/webrick/httprespose.rb:186:in 'send_body'
c:/Ruby/lib/1.9.1/webrick/httprespose.rb:103:in 'send_response'
c:/Ruby/lib/1.9.1/webrick/httpserver.rb:86:in 'run'
ERROR Errno:ECONNABORTED: An established connection was aborted by the software in your host machine:
c:/Ruby/lib/1.9.1/webrick/httpserver.rb:56:in 'eof?'
c:/Ruby/lib/1.9.1/webrick/httpserver.rb:56:in 'run'
c:/Ruby/lib/1.9.1/webrick/server.rb:183:in 'block in start_thread'
INFO going to shutdown....
INFO WEBrick::HTTPServer#start done
When I started to get this error?
When I added images, css and javascript in my project I started to get this error. I also tried by removing one of this 3 and see who causes the error but every time my ruby.exe get crashed and i see the error:
ruby.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
How can I solve this?
When I start server following is printed on console:
=>Booting WEBrick
=>Rails 3.0.3 application starting in development on http://0.0.0.0:3000
=>Call with -d to detach
=>Ctrl-C to shutdown server
[2011-02-23 10:59:22] INFO WEBrick 1.3.1
[2011-02-23 10:59:22] INFO ruby 1.9.2 (2010-08-18) [i386-mingw32]
[2011-02-23 10:59:22] INFO WEbrick::HTTPServer#start: pid:2448 port=3000
Output of ruby -v
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
... except the installer is now ALSO the crashing 1.9.2-p290
Workaround:
Add (or change)
config.log_level = :warn
in config/environments/development.rb
(not my solution - found it in another thread)
Running 1.9.2 on windows puts you in a REALLY small minority of users. If you don't have an explicit need for 1.9, I'd use 1.8.7. Specifically, I'd use the package from RailsInstaller: http://railsinstaller.org/
i got the same crashes on windows 7 with 1.9.2-p290. someone said to clear development.log file. i can't believe but after deleting my 12mb development.log everything works fine.
it is possible that a native (C) extension is failing and bringing the whole ruby down; in my case it was sql server adapter looping indefinitely/using whole heap; after we traced and fixed the bug in the adapter (https://github.com/rails-sqlserver/tiny_tds/pull/124) it does not fail again

Resources