Comments (12)
Hi @renatolond! I cannot reproduce the issue with the steps you provided. I start the app with rackup
and it works as expected (the server starts listening to connections).
from airbrake-ruby.
@kyrylo Sorry, forgot to add this to the steps, the issue happens when starting falcon with the way recommended in the docs:
bundle exec falcon serve -c config.ru
I can confirm that with rackup
I have no issues here either
from airbrake-ruby.
Thanks for the clarification but I still cannot reproduce this.
I copied the examples directory outside the falcon project so that there's no .git
folder available anywhere on the path. I also added a Gemfile with falcon
and local airbrake-ruby
. The server starts as expected.
from airbrake-ruby.
Oh, that's odd. Maybe it's an OS thing? My setup seems very similar to yours, but I still have the error (I also created a new folder, not in a git repo to be sure)
I'm running Arch Linux here, on Linux 5.16.14-arch1-1
from airbrake-ruby.
- What's your Ruby version?
- Do you have
git
installed and is it in yourPATH
?
from airbrake-ruby.
- I'm using ruby 3.1.1 here
- I do:
$ git --version
git version 2.35.1
from airbrake-ruby.
Can you try again with this line: Airbrake.delete_filter(Airbrake::Filters::GitRepositoryFilter)
(after the configure
call)? Will the error go away?
from airbrake-ruby.
No, I tried both inside the block and after the configure and I have the same error. It seems to happen while it's added.
if I comment it out in lib/airbrake-ruby/config/processor.rb
it seems to go away though
from airbrake-ruby.
So it fails on line 52:
airbrake-ruby/lib/airbrake-ruby/filters/git_repository_filter.rb
Lines 49 to 53 in f72c428
On line 50 we have a check that prevents line 52 executing if git
is not available. Line 52 calls fork()
and EAGAIN
errors means (according to OSX's man fork
):
ERRORS
fork() will fail and no child process will be created if:
[EAGAIN] The system-imposed limit on the total number of processes under execution would be exceeded. This limit is configuration-
dependent.
[EAGAIN] The system-imposed limit MAXUPRC (⟨sys/param.h⟩) on the total number of processes under execution by a single user would be
exceeded.
Do you start your falcon server in a container? Perhaps, you could tweak some of the limits so that spawning a new process is allowed?
from airbrake-ruby.
It was not in a container, I was testing a functionality locally so I was running on my dev env directly. As far as I know I don't have any limits that would block creation of the new processes:
$ ulimit -a
-t: cpu time (seconds) unlimited
-f: file size (blocks) unlimited
-d: data seg size (kbytes) unlimited
-s: stack size (kbytes) 8192
-c: core file size (blocks) unlimited
-m: resident set size (kbytes) unlimited
-u: processes 62621
-n: file descriptors 1024
-l: locked-in-memory size (kbytes) 8192
-v: address space (kbytes) unlimited
-x: file locks unlimited
-i: pending signals 62621
-q: bytes in POSIX msg queues 819200
-e: max nice 0
-r: max rt priority 0
-N 15: unlimited
Not sure if one of them could be responsible for this
I also tried starting falcon in different ways, even with just one instance (with -n 1
) the problem is still there:
$ bundle exec falcon serve -c config.ru -n 1
0.0s info: Falcon::Command::Serve [oid=0x7a8] [ec=0x7bc] [pid=6913] [2022-04-11 08:34:39 -0300]
| Falcon v0.39.2 taking flight! Using Async::Container::Forked {:count=>1}.
| - Binding to: #<Falcon::Endpoint https://localhost:9292/ {}>
| - To terminate: Ctrl-C or kill 6913
| - To reload configuration: kill -HUP 6913
0.03s info: Falcon::Controller::Serve [oid=0x7d0] [ec=0x7bc] [pid=6913] [2022-04-11 08:34:39 -0300]
| Starting Falcon Server on https://localhost:9292/
0.08s error: Async::Task [oid=0x7e4] [ec=0x7f8] [pid=6914] [2022-04-11 08:34:39 -0300]
| Errno::EAGAIN: Resource temporarily unavailable
| → /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/bundler/gems/airbrake-ruby-f72c428351b2/lib/airbrake-ruby/filters/git_repository_filter.rb:52 in ``'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/bundler/gems/airbrake-ruby-f72c428351b2/lib/airbrake-ruby/filters/git_repository_filter.rb:52 in `detect_git_version'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/bundler/gems/airbrake-ruby-f72c428351b2/lib/airbrake-ruby/filters/git_repository_filter.rb:14 in `initialize'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/bundler/gems/airbrake-ruby-f72c428351b2/lib/airbrake-ruby/config/processor.rb:66 in `new'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/bundler/gems/airbrake-ruby-f72c428351b2/lib/airbrake-ruby/config/processor.rb:66 in `block in add_filters'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/bundler/gems/airbrake-ruby-f72c428351b2/lib/airbrake-ruby/config/processor.rb:63 in `each'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/bundler/gems/airbrake-ruby-f72c428351b2/lib/airbrake-ruby/config/processor.rb:63 in `add_filters'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/bundler/gems/airbrake-ruby-f72c428351b2/lib/airbrake-ruby.rb:133 in `configure'
| config.ru:10 in `block in <main>'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116 in `eval'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116 in `new_from_string'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:105 in `load_file'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:66 in `parse_file'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/gems/falcon-0.39.2/lib/falcon/command/serve.rb:98 in `load_app'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/gems/falcon-0.39.2/lib/falcon/controller/serve.rb:60 in `load_app'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/gems/falcon-0.39.2/lib/falcon/controller/serve.rb:89 in `block (2 levels) in setup'
| /home/renatolond/.rvm/rubies/ruby-3.1.1-jemalloc/lib/ruby/gems/3.1.0/gems/async-2.0.1/lib/async/task.rb:258 in `block in schedule'
0.09s info: Async::Container::Forked [oid=0x80c] [ec=0x820] [pid=6913] [2022-04-11 08:34:39 -0300]
| #<Async::Container::Process Falcon Server> exited with pid 6914 exit 0
0.16s error: Async::Task [oid=0x834] [ec=0x848] [pid=6916] [2022-04-11 08:34:39 -0300]
| Errno::EAGAIN: Resource temporarily unavailable
from airbrake-ruby.
I published a fix: #684
Could you please give it a go, @renatolond?
from airbrake-ruby.
Yep, starting fine on that ref :) thanks!
bundle exec falcon serve -c config.ru -n 1
0.0s info: Falcon::Command::Serve [oid=0x7a8] [ec=0x7bc] [pid=27800] [2022-04-11 11:26:21 -0300]
| Falcon v0.39.2 taking flight! Using Async::Container::Forked {:count=>1}.
| - Binding to: #<Falcon::Endpoint https://localhost:9292/ {}>
| - To terminate: Ctrl-C or kill 27800
| - To reload configuration: kill -HUP 27800
0.03s info: Falcon::Controller::Serve [oid=0x7d0] [ec=0x7bc] [pid=27800] [2022-04-11 11:26:21 -0300]
| Starting Falcon Server on https://localhost:9292/
0.07s info: Async::Container::Process::Instance [oid=0x7e4] [ec=0x7f8] [pid=27801] [2022-04-11 11:26:21 -0300]
| - Per-process status: kill -USR1 27801
from airbrake-ruby.
Related Issues (20)
- rbtree collides with rmagick on aws linux HOT 8
- PerformanceNotifier outputting many logs when it should be disabled HOT 9
- Clarify the impact of disabling the `remote_config` feature HOT 3
- Is Airbrake.merge_context thread safe? HOT 1
- Its possible to log the output of all promises? HOT 5
- Enable proxy when fetching remote config
- Manual test code fails to generate airbrake ; program terminates too quickly HOT 2
- airbrake issues with lack of detail HOT 1
- Remote configuration is polled for despite `ignore_environments` HOT 1
- Performance monitoring scope/features HOT 2
- ArgumentError: invalid byte sequence in UTF-8 when reporting HOT 5
- Airbrake logging an unexpected 500 response from Airbrake API HOT 14
- Exceptions with nil for message cause error in v6.1.1 HOT 5
- sanitize_hash in KeysFilter may leak sensitive blocklisted params HOT 3
- Set error_host and apm_host to host by default HOT 3
- HTTP error: can't move from the enclosed thread group HOT 11
- 6.2.1-java missing on rubygems.org HOT 3
- Filter user object
- Error notifications are disabled (missing doc?) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from airbrake-ruby.