You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my quest of having Mastodon handle requests asynchronously, I have toyed with using Falcon instead of Puma, and making HTTP.rb use wrappers provided by async-io.
This seems to work reasonably well except the falcon processes eventually crash because it ran out of file descriptors. This may due to HTTP.rb leaking sockets, as hinted by socketry/async-io#13, but stopping the process because it couldn't accept one connection doesn't seem right.
Traceback (most recent call last):
7: from /home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/async-1.10.3/lib/async/task.rb:74:in `block in initialize'
6: from /home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/async-io-1.15.5/lib/async/io/shared_endpoint.rb:74:in `block (2 levels) in bind'
5: from /home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/async-io-1.15.5/lib/async/io/shared_endpoint.rb:102:in `block in accept'
4: from /home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/async-io-1.15.5/lib/async/io/socket.rb:61:in `accept_each'
3: from /home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/async-io-1.15.5/lib/async/io/socket.rb:86:in `accept'
2: from /home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/async-io-1.15.5/lib/async/io/generic.rb:128:in `async_send'
1: from /usr/lib/ruby/2.5.0/socket.rb:593:in `accept_nonblock'
/usr/lib/ruby/2.5.0/socket.rb:593:in `__accept_nonblock': Too many open files - accept(2) (Errno::EMFILE)
The text was updated successfully, but these errors were encountered:
If a child process crashes, it will be restarted. That is the default now. So at least in the case of badly behaving code, this should be less of an issue. Also, use Async::HTTP::Internet as a replacement for http.rb. It's going to scale way better.
In my quest of having Mastodon handle requests asynchronously, I have toyed with using Falcon instead of Puma, and making HTTP.rb use wrappers provided by
async-io
.This seems to work reasonably well except the falcon processes eventually crash because it ran out of file descriptors. This may due to HTTP.rb leaking sockets, as hinted by socketry/async-io#13, but stopping the process because it couldn't accept one connection doesn't seem right.
The text was updated successfully, but these errors were encountered: