我的heroku应用在闲置后没有唤醒,该如何解决?

时间:2018-12-17 22:10:28

标签: heroku

通常对于部署到heroku的应用程序,它会在一段时间不活动后进入睡眠状态,然后在下次收到请求时唤醒。

我的heroku应用进入睡眠状态但从未唤醒,相反,所有其他请求均失败,并显示错误503服务不可用。

下面的日志显示服务器成功处理GET,然后空转,然后使用503失败后续的GET。

我在做什么错了?

2018-12-17T20:58:51.809083+00:00 app[web.1]: [blaze-selector-0-1] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:15798 
2018-12-17T20:58:51.809110+00:00 app[web.1]: [blaze-selector-0-2] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:15800 
2018-12-17T20:59:39.849112+00:00 app[web.1]: [blaze-selector-0-3] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /10.11.240.16:12300 
2018-12-17T20:59:44.632655+00:00 heroku[router]: at=info method=GET path="/links/00000000-0000-0000-0000-000000000001" host=myapp-staging.herokuapp.com request_id=4433deb8-f756-416b-a5a4-3cd74569d757 fwd="188.222.59.63" dyno=web.1 connect=0ms service=4801ms status=200 bytes=138 protocol=https
2018-12-17T21:02:38.113793+00:00 app[web.1]: [blaze-selector-0-5] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:32820 
2018-12-17T21:04:40.059496+00:00 app[web.1]: [blaze-selector-0-6] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:43376 
2018-12-17T21:05:56.475780+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=myapp-staging.herokuapp.com request_id=fe4fb7c5-1b62-4c2e-9742-321349558e84 fwd="188.222.59.63" dyno=web.1 connect=0ms service=13ms status=404 bytes=150 protocol=https
2018-12-17T21:05:56.412727+00:00 heroku[router]: at=info method=GET path="/" host=myapp-staging.herokuapp.com request_id=57345abd-e5a3-4f65-b2a8-e4d931c40e8c fwd="188.222.59.63" dyno=web.1 connect=0ms service=25ms status=200 bytes=194 protocol=https
2018-12-17T21:06:32.041023+00:00 heroku[router]: at=info method=GET path="/" host=myapp-staging.herokuapp.com request_id=39acaa62-2a12-418c-9963-29615985ddfd fwd="188.222.59.63" dyno=web.1 connect=1ms service=6ms status=200 bytes=194 protocol=https
2018-12-17T21:06:32.033771+00:00 app[web.1]: [blaze-selector-0-0] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /10.98.43.56:22354 
2018-12-17T21:06:42.221086+00:00 app[web.1]: [blaze-selector-0-1] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:52748 
2018-12-17T21:08:43.989680+00:00 app[web.1]: [blaze-selector-0-2] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:10829 
2018-12-17T21:10:46.187984+00:00 app[web.1]: [blaze-selector-0-3] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:19661 
2018-12-17T21:12:48.015650+00:00 app[web.1]: [blaze-selector-0-4] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:28185 
2018-12-17T21:14:50.195340+00:00 app[web.1]: [blaze-selector-0-5] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:37027 
2018-12-17T21:14:53.474371+00:00 heroku[router]: at=info method=GET path="/links/00000000-0000-0000-0000-000000000001" host=myapp-staging.herokuapp.com request_id=10633389-4b06-4170-b0d5-2af9a221d84e fwd="188.222.59.63" dyno=web.1 connect=0ms service=35ms status=200 bytes=138 protocol=https
2018-12-17T21:14:53.437579+00:00 app[web.1]: [blaze-selector-0-6] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /10.12.9.85:21317 
2018-12-17T21:16:52.053995+00:00 app[web.1]: [blaze-selector-0-7] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:45805 
2018-12-17T21:18:54.199836+00:00 app[web.1]: [blaze-selector-0-8] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:54979 
2018-12-17T21:20:56.046776+00:00 app[web.1]: [blaze-selector-0-0] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:13104 
2018-12-17T21:22:58.249769+00:00 app[web.1]: [blaze-selector-0-1] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:21992 
2018-12-17T21:25:00.154434+00:00 app[web.1]: [blaze-selector-0-2] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:31366 
2018-12-17T21:27:02.320079+00:00 app[web.1]: [blaze-selector-0-3] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:41842 
2018-12-17T21:29:04.180091+00:00 app[web.1]: [blaze-selector-0-4] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:52836 
2018-12-17T21:31:06.270844+00:00 app[web.1]: [blaze-selector-0-5] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:12529 
2018-12-17T21:33:08.089936+00:00 app[web.1]: [blaze-selector-0-6] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:22481 
2018-12-17T21:35:09.939839+00:00 app[web.1]: [blaze-selector-0-7] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:31503 
2018-12-17T21:37:12.103341+00:00 app[web.1]: [blaze-selector-0-8] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:40125 
2018-12-17T21:39:13.989372+00:00 app[web.1]: [blaze-selector-0-0] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:49079 
2018-12-17T21:41:16.142178+00:00 app[web.1]: [blaze-selector-0-1] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:58303 
2018-12-17T21:43:18.008927+00:00 app[web.1]: [blaze-selector-0-2] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:15956 
2018-12-17T21:45:20.206994+00:00 app[web.1]: [blaze-selector-0-3] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:24678 
2018-12-17T21:47:22.071308+00:00 app[web.1]: [blaze-selector-0-4] [34mINFO [0;39m [36mo.h.b.c.n.NIO1SocketServerGroup[0;39m - Accepted connection from /172.16.13.149:32846 
2018-12-17T21:47:23.007251+00:00 heroku[web.1]: Idling
2018-12-17T21:47:23.081290+00:00 heroku[web.1]: State changed from up to down
2018-12-17T21:47:24.005482+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-12-17T21:47:24.079711+00:00 app[web.1]: [blaze-selector-0-0] [34mINFO [0;39m [36mo.h.b.c.ServerChannel[0;39m - Closing NIO1 channel /0:0:0:0:0:0:0:0:54949 
2018-12-17T21:47:24.089836+00:00 app[web.1]: [shutdownHook1] [34mINFO [0;39m [36mo.h.b.c.n.SelectorLoop[0;39m - Shutting down SelectorLoop blaze-selector-0-0 
2018-12-17T21:47:24.092601+00:00 app[web.1]: [shutdownHook1] [34mINFO [0;39m [36mo.h.b.c.n.SelectorLoop[0;39m - Shutting down SelectorLoop blaze-selector-0-1 
2018-12-17T21:47:24.092968+00:00 app[web.1]: [shutdownHook1] [34mINFO [0;39m [36mo.h.b.c.n.SelectorLoop[0;39m - Shutting down SelectorLoop blaze-selector-0-2 
2018-12-17T21:47:24.093922+00:00 app[web.1]: [shutdownHook1] [34mINFO [0;39m [36mo.h.b.c.n.SelectorLoop[0;39m - Shutting down SelectorLoop blaze-selector-0-3 
2018-12-17T21:47:24.095441+00:00 app[web.1]: [shutdownHook1] [34mINFO [0;39m [36mo.h.b.c.n.SelectorLoop[0;39m - Shutting down SelectorLoop blaze-selector-0-4 
2018-12-17T21:47:24.095756+00:00 app[web.1]: [shutdownHook1] [34mINFO [0;39m [36mo.h.b.c.n.SelectorLoop[0;39m - Shutting down SelectorLoop blaze-selector-0-5 
2018-12-17T21:47:24.096042+00:00 app[web.1]: [shutdownHook1] [34mINFO [0;39m [36mo.h.b.c.n.SelectorLoop[0;39m - Shutting down SelectorLoop blaze-selector-0-6 
2018-12-17T21:47:24.096350+00:00 app[web.1]: [shutdownHook1] [34mINFO [0;39m [36mo.h.b.c.n.SelectorLoop[0;39m - Shutting down SelectorLoop blaze-selector-0-7 
2018-12-17T21:47:24.097162+00:00 app[web.1]: [shutdownHook1] [34mINFO [0;39m [36mo.h.b.c.n.SelectorLoop[0;39m - Shutting down SelectorLoop blaze-selector-0-8 
2018-12-17T21:47:24.100092+00:00 app[web.1]: [shutdownHook1] [34mINFO [0;39m [36mc.z.h.HikariDataSource[0;39m - HikariPool-1 - Shutdown initiated... 
2018-12-17T21:47:24.133259+00:00 app[web.1]: [shutdownHook1] [34mINFO [0;39m [36mc.z.h.HikariDataSource[0;39m - HikariPool-1 - Shutdown completed. 
2018-12-17T21:47:24.260516+00:00 heroku[web.1]: Process exited with status 143
2018-12-17T22:01:35.177940+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/links/00000000-0000-0000-0000-000000000001" host=myapp-staging.herokuapp.com request_id=28434730-9472-4a60-acc3-c0fb29bf83a8 fwd="188.222.59.63" dyno= connect= service= status=503 bytes= protocol=https
2018-12-17T22:01:52.732619+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/links/00000000-0000-0000-0000-000000000001" host=myapp-staging.herokuapp.com request_id=3c367d74-7cac-45ca-926a-1dd3cc657743 fwd="188.222.59.63" dyno= connect= service= status=503 bytes= protocol=https

0 个答案:

没有答案