Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Server crashed with src/zsock.c:563: zsock_attach: Assertion 'self' failed. #150

Closed
1 task done
rockychan opened this issue Oct 2, 2016 · 3 comments
Closed
1 task done
Assignees

Comments

@rockychan
Copy link
Contributor

rockychan commented Oct 2, 2016

(Describe the issue here)

  • Skygear Server Date/Version: 0.14.0
  • Attached logs, screenshots

https://gist.github.com/rockychan/11526bc2fc2f842c60124db99aedb64a

@royuen royuen added the Focus label Oct 2, 2016
@rickmak
Copy link
Member

rickmak commented Oct 3, 2016

@rockychan may I have your changeset on last working deployment and current one?

@rickmak rickmak self-assigned this Oct 3, 2016
@rockychan
Copy link
Contributor Author

rockychan commented Oct 3, 2016

@rickmak
Copy link
Member

rickmak commented Oct 11, 2016

According to the log provided, the program is hitting the default limit of zmq socket. Which is 1024 ref: http://api.zeromq.org/3-2:zmq-ctx-set

To get around your issue quick, you should raise the following figure to handle more concurrency

  • zmq socket limit
    Add ZSYS_MAX_SOCKETS: 10240 to your skygear-server environment. If you are using docker, add it to docker-compose.override.yml.
  • ulimit in your OS
    Modify /etc/security/limits.conf, add
    soft nofile 10240 hard nofile 10240 to your setting
  • ulimit in docker
    Ensure limit nofile specific /etc/init/docker.conf have large value (>10240 in our case). Restart the docker daemon to apply the new OS limit to docker container. Normally with
    sudo service docker stop && sudo service docker start

We will reuse the inproc zmq socket or change to use go chan. And to be address in separate issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants