Closed mgbeyer closed 9 years ago
Hey @mgbeyer,
sorry for the late response. Your problem is related to ruby's GIL and the fact that webrick/thin are both single threaded and can't handle concurrent requests. The two iQvoc instances are talking to each other and webrick can't process another request until the first one is finished. This should be no problem in production.
You should try to run two instances using passenger on your local development environment.
# install passenger
gem install passenger
# in project root of iQvoc instance A
passenger start
# in project root of iQvoc instance B
passenger start -p 3001
Now you got two running iQvoc instances (localhost:3000 and localhost:3001). Update each federation configuration and try again. Let us know if there are further problems.
My bad, basically Thin should be able to handle this but I forgot the --threaded option (which is experimental anyway so Passenger/Nginx is maybe a better choice here and works just fine).
Federation: mutual reference problem
When I declare two local instances of iqvoc mutually as federation servers in the configuration dialog, I face connection problems. Here's the basic setup:
Instance A running at 127.0.0.2:3000 Instance B running at 127.0.0.3:3000 (over webrick or thin (e.g.) doesn't really matter in the outcome)
In instance A I configure instance B (127.0.0.3:3000) as a federation server. In instance B I configure instance A (127.0.0.2:3000) as a federation server.
In the search dialog in either instance the other one shows up correctly as an external source. But if you begin typing in a search term as soon as the AJAX call kicks in (after the third character) the spinner icon shows up and everything freezes (both instances don't respond any longer).
If you omit the mutuality in this scenario, everything works fine. So I guess because of the mutuality some sort of vicious feedback loop between both federations occur??? I don't know, at least it appears so.
So I wonder what happens here? Is declaring mutual federation servers not part of the concept?