{"action":"created","issue":{"url":"https://api.github.com/repos/chainer/chainerui/issues/139","repository_url":"https://api.github.com/repos/chainer/chainerui","labels_url":"https://api.github.com/repos/chainer/chainerui/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/chainer/chainerui/issues/139/comments","events_url":"https://api.github.com/repos/chainer/chainerui/issues/139/events","html_url":"https://github.com/chainer/chainerui/pull/139","id":348699539,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2OTg3MzY1","number":139,"title":"Fix development server warning","user":{"login":"gky360","id":17793678,"node_id":"MDQ6VXNlcjE3NzkzNjc4","avatar_url":"https://avatars2.githubusercontent.com/u/17793678?v=4","gravatar_id":"","url":"https://api.github.com/users/gky360","html_url":"https://github.com/gky360","followers_url":"https://api.github.com/users/gky360/followers","following_url":"https://api.github.com/users/gky360/following{/other_user}","gists_url":"https://api.github.com/users/gky360/gists{/gist_id}","starred_url":"https://api.github.com/users/gky360/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gky360/subscriptions","organizations_url":"https://api.github.com/users/gky360/orgs","repos_url":"https://api.github.com/users/gky360/repos","events_url":"https://api.github.com/users/gky360/events{/privacy}","received_events_url":"https://api.github.com/users/gky360/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/chainer/chainerui/milestones/5","html_url":"https://github.com/chainer/chainerui/milestone/5","labels_url":"https://api.github.com/repos/chainer/chainerui/milestones/5/labels","id":3474834,"node_id":"MDk6TWlsZXN0b25lMzQ3NDgzNA==","number":5,"title":"v0.5.0","description":"","creator":{"login":"disktnk","id":414255,"node_id":"MDQ6VXNlcjQxNDI1NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/414255?v=4","gravatar_id":"","url":"https://api.github.com/users/disktnk","html_url":"https://github.com/disktnk","followers_url":"https://api.github.com/users/disktnk/followers","following_url":"https://api.github.com/users/disktnk/following{/other_user}","gists_url":"https://api.github.com/users/disktnk/gists{/gist_id}","starred_url":"https://api.github.com/users/disktnk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/disktnk/subscriptions","organizations_url":"https://api.github.com/users/disktnk/orgs","repos_url":"https://api.github.com/users/disktnk/repos","events_url":"https://api.github.com/users/disktnk/events{/privacy}","received_events_url":"https://api.github.com/users/disktnk/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":9,"state":"open","created_at":"2018-07-05T07:23:59Z","updated_at":"2018-08-09T02:42:00Z","due_on":"2018-08-10T07:00:00Z","closed_at":null},"comments":0,"created_at":"2018-08-08T12:14:10Z","updated_at":"2018-08-09T10:07:48Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/chainer/chainerui/pulls/139","html_url":"https://github.com/chainer/chainerui/pull/139","diff_url":"https://github.com/chainer/chainerui/pull/139.diff","patch_url":"https://github.com/chainer/chainerui/pull/139.patch"},"body":"Resolve #107 \r\n\r\nUse production server by default.\r\n\r\nWhen we run `chainerui server` , ChainerUI runs with [gevent](http://www.gevent.org/api/gevent.pywsgi.html#module-gevent.pywsgi) production server.\r\nWhen we run `chainerui server --debug` , ChainerUI runs with flask development server (same behavior as current master branch)\r\n\r\nI chose `gevent` from \"Self-hosted options\" in [Deployment Options](http://flask.pocoo.org/docs/dev/deploying/) ."},"comment":{"url":"https://api.github.com/repos/chainer/chainerui/issues/comments/411707320","html_url":"https://github.com/chainer/chainerui/pull/139#issuecomment-411707320","issue_url":"https://api.github.com/repos/chainer/chainerui/issues/139","id":411707320,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTcwNzMyMA==","user":{"login":"disktnk","id":414255,"node_id":"MDQ6VXNlcjQxNDI1NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/414255?v=4","gravatar_id":"","url":"https://api.github.com/users/disktnk","html_url":"https://github.com/disktnk","followers_url":"https://api.github.com/users/disktnk/followers","following_url":"https://api.github.com/users/disktnk/following{/other_user}","gists_url":"https://api.github.com/users/disktnk/gists{/gist_id}","starred_url":"https://api.github.com/users/disktnk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/disktnk/subscriptions","organizations_url":"https://api.github.com/users/disktnk/orgs","repos_url":"https://api.github.com/users/disktnk/repos","events_url":"https://api.github.com/users/disktnk/events{/privacy}","received_events_url":"https://api.github.com/users/disktnk/received_events","type":"User","site_admin":false},"created_at":"2018-08-09T10:07:48Z","updated_at":"2018-08-09T10:07:48Z","author_association":"MEMBER","body":"Thank you for your PR, Gevent looks great for production server. I have some concerns about this modification.\r\n\r\n### Start logging\r\n\r\ncurrent (not debugging mode)\r\n\r\n```\r\n17:56 $ chainerui server\r\n * Serving Flask app \"chainerui\" (lazy loading)\r\n * Environment: production\r\n   WARNING: Do not use the development server in a production environment.\r\n   Use a production WSGI server instead.\r\n * Debug mode: off\r\n * Running on http://localhost:5000/ (Press CTRL+C to quit)\r\n```\r\n\r\nafter (`--debug`)\r\n```\r\n18:36 $ chainerui server --debug\r\n * Serving Flask app \"chainerui\" (lazy loading)\r\n * Environment: development\r\n * Debug mode: on\r\n * Running on http://localhost:5000/ (Press CTRL+C to quit)\r\n * Restarting with stat\r\n * Debugger is active!\r\n * Debugger PIN: 258-484-058\r\n127.0.0.1 - - [09/Aug/2018 18:37:04] \"GET / HTTP/1.1\" 200 -\r\n```\r\n\r\nafter2 (production mode)\r\n```\r\n18:42 $ chainerui server\r\n```\r\n\r\n- output logs are happy for users?\r\n- on production mode, no logging is acceptable?\r\n  - there is no guide to stop the server\r\n\r\n### Server shutdown\r\n\r\nWhen press `Ctrl+C`, the server is shutdown with the blow log.\r\n\r\n```\r\n18:54 $ chainerui server\r\n^CKeyboardInterrupt\r\n2018-08-09T09:55:00Z\r\nTraceback (most recent call last):\r\n  File \"/mnt/c/Development/gopath/src/github.com/chainer/chainerui/venv/py3/bin/chainerui\", line 11, in <module>\r\n    load_entry_point('chainerui', 'console_scripts', 'chainerui')()\r\n  File \"/mnt/c/Development/gopath/src/github.com/chainer/chainerui/chainerui/app.py\", line 137, in main\r\n    args.handler(args)\r\n  File \"/mnt/c/Development/gopath/src/github.com/chainer/chainerui/chainerui/app.py\", line 46, in server_handler\r\n    http_server.serve_forever()\r\n  File \"/mnt/c/Development/gopath/src/github.com/chainer/chainerui/venv/py3/lib/python3.6/site-packages/gevent/baseserver.py\", line 364, in serve_forever\r\n    self._stop_event.wait()\r\n  File \"src/gevent/event.py\", line 240, in gevent._event.Event.wait\r\n  File \"src/gevent/event.py\", line 140, in gevent._event._AbstractLinkable._wait\r\n  File \"src/gevent/event.py\", line 117, in gevent._event._AbstractLinkable._wait_core\r\n  File \"src/gevent/event.py\", line 119, in gevent._event._AbstractLinkable._wait_core\r\n  File \"src/gevent/_greenlet_primitives.py\", line 59, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch\r\n  File \"src/gevent/_greenlet_primitives.py\", line 59, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch\r\n  File \"src/gevent/_greenlet_primitives.py\", line 63, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch\r\n  File \"src/gevent/__greenlet_primitives.pxd\", line 35, in gevent.__greenlet_primitives._greenlet_switch\r\nKeyboardInterrupt\r\n```\r\n\r\nIt looks harmful for me, (but I don't confirm that this issue is occurred only for me or not). Should server module catch signals, or ChainerUI provide tools to stop the server?"}}
{"actor":{"display_login":"disktnk"}}