Questions tagged [em-synchrony]
11 questions
2
votes
0 answers
FiberError: 'fiber called across threads' using em-synchrony
I am using em-synchrony and em-http-request (Ruby 2.1) inside a sidekiq worker to scrape a number of links concurrently. Everything works well, except when I try and run multiple workers with the scraper at the same time. This is the code I'm…

TenJack
- 1,594
- 4
- 21
- 35
1
vote
1 answer
Get amount of open fibers in ruby
How can I get the current amount of open Fibers in a ruby application? My app uses EventMachine Synchrony lib for concurrency handling. While googling, I've not found any API which would return it.
For example if I have this piece of…

Roman Sosnin
- 31
- 4
1
vote
0 answers
A fiber issue with `autoload`: `fiber called across stack rewinding barrier (FiberError)`
We are using fiber with eventmachine (em-synchrony) in our production
env for quite a long time, and it works very well. We use the outdated
ruby 1.9.3 and ActiveRecord 3.x for over 2 years. We are migrating those
two big parts to the latest…

qqshfox
- 11
- 2
1
vote
1 answer
Websocket-rails gem in standalone mode FiberError
I'm first time working with websocket-rails gem. When i trying to trigger some event in standalone mode my server falls with error. But if standalone mode = false there are no errors
This is full stack trace
FiberError - can't yield from root…

selivandex
- 85
- 1
- 5
1
vote
0 answers
Sinatra::Synchrony with websocket
Given Sinatra::Synchrony is using EM-Synchrony "collection of convenience classes and primitives to help untangle evented code" so that you can write "fast, highly concurrent web applications with no callbacks (just by developing as if you were…

Redoman
- 3,059
- 3
- 34
- 62
0
votes
1 answer
Ruby Running in Parallel
I currently have a small ruby script, which is connecting to the remote SSH servers and checking the size of the files and providing results whether it has been changed or not.
The issue is that there are around 10 servers like this. I would like to…

Maxo
- 528
- 4
- 13
0
votes
1 answer
Any examples of handling receive_data and em-synchrony?
Does anyone have any examples of building a custom network client that uses em-synchrony and receive_data ?

Geo
- 93,257
- 117
- 344
- 520
0
votes
0 answers
EM::Synchrony.defer with fiber aware database call causes FiberError exception
I'm trying to use EM-Synchrony for concurrency in an application and have come across an issue with my use of deferred code and Fibers.
Any calls to the database within either EM.defer or EM::Synchrony.defer results in the application crashing with…

Landstander
- 476
- 4
- 12
0
votes
1 answer
cramp framework sync 'render' correct way using em-synchrony
To describe my problem I attach simple Cramp http://cramp.in/ class.
I add some modification but its mainly work like https://github.com/lifo/cramp-pub-sub-chat-demo/blob/master/app/actions/chat_action.rb
class ChatAction < Cramp::Websocket
…

mateuszdw
- 61
- 1
- 8
0
votes
1 answer
em-synchrony using http.get and iterators causing can't yield in root Fiber error
A very simple case where I get the root Fiber error.
require 'em-synchrony'
require 'em-synchrony/em-http'
urls = %w{http://www.google.com http://www.google.com http://www.google.com http://www.google.com http://www.google.com…

keaplogik
- 2,369
- 2
- 25
- 26
0
votes
1 answer
how to use EM::Synchrony::Multi with redis?
I am trying to perform several redis queries in parallel, but getting an error:
/var/lib/gems/1.9.1/gems/em-synchrony-1.0.2/lib/em-synchrony.rb:53:in `resume':
dead fiber called (FiberError)
here is the code:
require 'em-synchrony'
require…

akonsu
- 28,824
- 33
- 119
- 194