Timeout in the "Start a group" wizard
Hello there,
I have followed the loomio-deploy README.md some four or five times, with clean installs on debian jessie virtual machines. Everything seemed OK but the application was really sluggish, and I was getting a timeout when creating a group. I was blaming it on being short of RAM and horsepower.
But today I started from scratch on a rather cool laptop running a current opensuse tumbleweed, with 4Gb RAM and SSD harddisk and, while the sluggishness is gone, the timeout is still there.
Steps to reproduce (this works for me every time):
- Install a clean instance from scratch
- Access the app on the browser and create a new user
- Launch the "Start a group" wizard, fill a name and a description, push "Start group" blue button
At this point the webapp shows the "Loading" notification in the lower-left corner for a while, and then it stays forever in the "Start a group" wizard.
When I close the "Start a group" wizard I can see the group has been created, but I am not a member and, while I can request membership, I don't get any email, and I don't see any smtp-related error on the logs.
I am copying two fragments of the logfiles here, inline, and I am attaching the full logfile to this post.
I get a timeout in the 'docker-compose logs' output for 'loomio_1':
> Started POST "/api/v1/groups" for 172.17.0.7 at 2017-02-15 14:48:14 +0000
> Processing by API::GroupsController#create as JSON
> Parameters: {"group"=>{"parent_id"=>nil, "name"=>"Group Name", "group_privacy"=>"closed", "discussion_privacy_options"=>"private_only", "members_can_add_members"=>true, "members_can_edit_discussions"=>true, "members_can_edit_comments"=>true, "motions_can_be_edited"=>false, "description"=>"Description", "membership_granted_upon"=>"approval", "members_can_raise_motions"=>true, "members_can_vote"=>true, "members_can_start_discussions"=>true, "members_can_create_subgroups"=>false}}
> [ActiveJob] Enqueued SendBulkEmailJob (Job ID: f10aa9dd-d5f9-4489-853f-5e58f17eed83) to DelayedJob(default) at 2017-02-15 14:48:14 UTC with arguments: 1
> Completed 500 Internal Server Error in 60605ms (ActiveRecord: 53.4ms)
> Net::OpenTimeout (execution expired):
> app/services/message_channel_service.rb:16:in publish' config/initializers/event_bus.rb:86:inblock (2 levels) in '
> app/extras/event_bus.rb:8:in block in broadcast' app/extras/event_bus.rb:8:inbroadcast'
> app/models/events/new_discussion.rb:4:in block in publish!' app/models/events/new_discussion.rb:4:intap'
> app/models/events/new_discussion.rb:4:in publish!' app/extras/example_content.rb:6:inblock in add_to_group!'
> app/extras/example_content.rb:5:in tap' app/extras/example_content.rb:5:inadd_to_group!'
> app/services/group_service.rb:12:in create' app/controllers/api/restful_controller.rb:12:increate_action'
> app/controllers/api/groups_controller.rb:17:in `create'
And then I get this from time to time, in 'nginx_1'
> 2017/02/15 14:49:14 [warn] 52#52: *35 upstream server temporarily disabled while reading response header from upstream, client: 10.10.10.40, server: loomio.test.example.com, request: "POST /api/v1/groups HTTP/1.1", upstream: "http://172.17.0.5:3000/api/v1/groups", host: "loomio.test.example.com", referrer: "https://loomio.test.example.com/explore"
Thanks for your help
Hey Robert, thanks for the quick reply!
I disabled FAYE, as you suggest, and this fixed my issue.
But it's not a local deployment; I feel it is properly set up, with a proper IPv4 public address, the public DNS records set up as stated on the loomio_deploy documentation, running as root on an up-to-date opensuse tumbleweed. I think there is something not OK with my email configuration b/c I see now that it works properly I am not getting any emails. But in all other respects I followed the guide quite accurately, I hope.
Can you briefly explain the role of FAYE in LOOMIO? Is it optional? just for small deployments perhaps?
Thanks!
What did you use to "install a clean instance"? Seems like you're trying to run the production config, loomio_deploy, locally.
In which case I suspect your faye server is not running, thus the timeouts.
edit your ENV and disable FAYE by commenting out FAYE_URL