#99 open
maiken

thin stop times out and fails

Reported by maiken | May 17th, 2009 @ 11:19 AM | in Waiting for EM

Repro:

  • Install ruby 1.9.1p129 (2009-05-12 revision 23412) and thin 1.2.1 on Ubuntu 8.04 LTS
  • Write a hello-world rackup file and save as hello_world.ru
app = proc do |env|
 [
  200,
  {
    'Content-Type' => 'text/html',
    'Content-Length' => '2'
  },
  ['hi']
 ]
end

run app
  • Start a cluster of thin processes: "thin start -s 3 -R hello_world.ru"
  • Now try to stop them: "thin stop -s 3"

Results:

Stopping server on 0.0.0.0:3000 ... 
Sending QUIT signal to process 31975 ... 
Timeout!
Stopping server on 0.0.0.0:3001 ... 
Sending QUIT signal to process 31988 ... 
Timeout!
Stopping server on 0.0.0.0:3002 ... 
Sending QUIT signal to process 32001 ... 
Timeout!

thin processes are still running.

the thin processes aren't responsive to a regular "kill ", either.
However, if I load from their respective ports, they process the quit request and exit. That is, if, while "thin stop" is trying to stop the port-3000 daemon, I do an HTTP load against port 3000, the process will exit. Without the load, the process will run forever.

Expect: thin processes are responsive to quit requests.

If you have difficulty reproducing the issue let me know how to take additional traces.

Comments and changes to this ticket

  • maiken

    maiken May 17th, 2009 @ 11:29 AM

    • Tag set to epoll, eventmachine, ruby19

    Update: passing --no-epoll when starting the cluster solves the problem. Is this a known eventmachine issue?

  • macournoyer

    macournoyer May 18th, 2009 @ 09:06 AM

    • State changed from “new” to “open”

    It do look like an old eventmachine issue, can you try updating to latest version of EM?

  • maiken

    maiken May 18th, 2009 @ 10:16 AM

    $ gem list

    eventmachine (0.12.6)

    This is the most recent version offered on RubyForge; if you are suggesting I run code more recent than this, how should I install it?

  • maiken

    maiken May 21st, 2009 @ 12:31 PM

    Any news on this? Should I be installing Eventmachine from somewhere else (please specify?)

  • macournoyer

    macournoyer May 21st, 2009 @ 02:13 PM

    • Milestone changed from Future to Waiting for EM

    There was a similar issue in previous version but under 1.8 iirc. If it works w/out epoll it probably is an EventMachine issue. You should ask eventmachine ppl about it:

    http://groups.google.com/group/eventmachine/topics
    or #eventmachine on freenode

  • maiken

    maiken May 29th, 2009 @ 04:40 PM

    Just to be clear, can you confirm that thin uses eventmachine even under Ruby 1.9? One of the EM folks had the impression that it does not...

  • macournoyer

    macournoyer May 29th, 2009 @ 04:44 PM

    oh yes, Thin uses eventmachine exclusively, unless you explicitly specify a backend using the --backend option.

  • SergiRoberto

    SergiRoberto February 19th, 2021 @ 08:27 AM

    I have ordered an essay with https://freepaperwriter.com company a few months ago as I was overwhelmed with other essays and exams coming up. They delivered my work a few days in advance and when I asked if the writer could add something else that I needed, my writer helped me straight away. They even fixed my order on a Sunday and that tells a lot about the customer service that they have. I will definitely recommend this to any of you who is looking for a little help with essays at a stressful time.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages