{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/6439","repository_url":"https://api.github.com/repos/bokeh/bokeh","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/6439/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/6439/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/6439/events","html_url":"https://github.com/bokeh/bokeh/issues/6439","id":235111249,"number":6439,"title":"Server(..., io_loop=io_loop, num_procs=0) --> RuntimeError","user":{"login":"jbrockmendel","id":8078968,"avatar_url":"https://avatars2.githubusercontent.com/u/8078968?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrockmendel","html_url":"https://github.com/jbrockmendel","followers_url":"https://api.github.com/users/jbrockmendel/followers","following_url":"https://api.github.com/users/jbrockmendel/following{/other_user}","gists_url":"https://api.github.com/users/jbrockmendel/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrockmendel/subscriptions","organizations_url":"https://api.github.com/users/jbrockmendel/orgs","repos_url":"https://api.github.com/users/jbrockmendel/repos","events_url":"https://api.github.com/users/jbrockmendel/events{/privacy}","received_events_url":"https://api.github.com/users/jbrockmendel/received_events","type":"User","site_admin":false},"labels":[{"id":202852072,"url":"https://api.github.com/repos/bokeh/bokeh/labels/tag:%20component:%20server","name":"tag: component: server","color":"D0CBB8","default":false},{"id":106468141,"url":"https://api.github.com/repos/bokeh/bokeh/labels/type:%20task","name":"type: task","color":"872A50","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/bokeh/bokeh/milestones/31","html_url":"https://github.com/bokeh/bokeh/milestone/31","labels_url":"https://api.github.com/repos/bokeh/bokeh/milestones/31/labels","id":2439698,"number":31,"title":"0.12.7","description":"","creator":{"login":"mattpap","id":27475,"avatar_url":"https://avatars1.githubusercontent.com/u/27475?v=3","gravatar_id":"","url":"https://api.github.com/users/mattpap","html_url":"https://github.com/mattpap","followers_url":"https://api.github.com/users/mattpap/followers","following_url":"https://api.github.com/users/mattpap/following{/other_user}","gists_url":"https://api.github.com/users/mattpap/gists{/gist_id}","starred_url":"https://api.github.com/users/mattpap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattpap/subscriptions","organizations_url":"https://api.github.com/users/mattpap/orgs","repos_url":"https://api.github.com/users/mattpap/repos","events_url":"https://api.github.com/users/mattpap/events{/privacy}","received_events_url":"https://api.github.com/users/mattpap/received_events","type":"User","site_admin":false},"open_issues":109,"closed_issues":50,"state":"open","created_at":"2017-04-06T14:09:39Z","updated_at":"2017-06-30T23:01:54Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2017-06-12T02:26:59Z","updated_at":"2017-07-01T01:18:04Z","closed_at":null,"body":"From the [flask_embed](https://github.com/bokeh/bokeh/blob/master/examples/howto/server_embed/flask_embed.py) example:\r\n\r\n```\r\nbokeh_app = Application(FunctionHandler(modify_doc))\r\n\r\nio_loop = IOLoop.current()\r\n\r\nserver = Server({'/bkapp': bokeh_app}, io_loop=io_loop, allow_websocket_origin=[\"localhost:8080\"])\r\nserver.start()\r\n```\r\n\r\n`Server.__init__` takes a [kwarg](https://github.com/bokeh/bokeh/blob/master/bokeh/server/server.py#L81) `num_procs` that I'd like to set to 0 to fork a reasonable number of processes*.  But since the `IOLoop` has already been initialized, that raises:\r\n\r\n```\r\nRuntimeError: Cannot run in multiple processes: IOLoop instance has already been initialized. You cannot call IOLoop.instance() before calling start_processes()\r\n```\r\n\r\nMost of the examples I've seen calling `Server.__init__` pass an `IOLoop` object.  So is there another place `num_procs` is supposed to be passed?\r\n\r\n\\* As it is, only one request is getting served at a time.  That suggests that I'm somehow using Tornado wrong, but that's a question for StackExchange.\r\n\r\n\r\npython2 .7.12 running on AWS linux.\r\nbokeh 0.12.5\r\n"},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/312401954","html_url":"https://github.com/bokeh/bokeh/issues/6439#issuecomment-312401954","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/6439","id":312401954,"user":{"login":"jbrockmendel","id":8078968,"avatar_url":"https://avatars2.githubusercontent.com/u/8078968?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrockmendel","html_url":"https://github.com/jbrockmendel","followers_url":"https://api.github.com/users/jbrockmendel/followers","following_url":"https://api.github.com/users/jbrockmendel/following{/other_user}","gists_url":"https://api.github.com/users/jbrockmendel/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrockmendel/subscriptions","organizations_url":"https://api.github.com/users/jbrockmendel/orgs","repos_url":"https://api.github.com/users/jbrockmendel/repos","events_url":"https://api.github.com/users/jbrockmendel/events{/privacy}","received_events_url":"https://api.github.com/users/jbrockmendel/received_events","type":"User","site_admin":false},"created_at":"2017-07-01T01:18:04Z","updated_at":"2017-07-01T01:18:04Z","body":"It's on my eventual-to-do list.  Pretty much zero chance it'll happen in the next week.  Go ahead and close for now."}}
{"actor":{"display_login":"jbrockmendel"}}