2017-09-04 108 views
0

我正在使用phantomjs docker容器,最新版本的wernight/phantomjs。這裏是鏈接。 https://hub.docker.com/r/wernight/phantomjs/ 問題是;當我啓動容器時,經過一段時間(2-3天)後,容器突然停止並出現錯誤。任何人有任何想法或建議?我使用現有的容器。Docker PhantomJS 2容器突然停止

ERROR - 2017-08-29T05:26:36.534Z] RouterReqHand - _handle.error -   
{"stack":"[email protected][native code]\[email protected]://platform/webpage.js:390:39\[email protected]://code/webelement_request_handler.js:341:90\[email protected]://code/webelement_request_handler.js:102:28\[email protected]://code/session_request_handler.js:61:20\[email protected]://code/session_request_handler.js:120:42\[email protected]://code/request_handler.js:61:20\[email protected]://code/router_request_handler.js:78:46","line":390,"sourceURL":"phantomjs://platform/webpage.js"} 


phantomjs://platform/console++.js:263 in error 
1 0x1b67967 phantomjs() [0x1b67967] 
2 0x1b800a9 phantomjs() [0x1b800a9] 
3 0x92035b phantomjs() [0x92035b] 
4 0x13b9e20 phantomjs() [0x13b9e20] 
5 0x13b9f2a phantomjs() [0x13b9f2a] 
6 0x13bb9c1 phantomjs() [0x13bb9c1] 
7 0x13bcaa4 phantomjs() [0x13bcaa4] 
8 0x13bcb6c phantomjs() [0x13bcb6c] 
9 0x97bf27 phantomjs() [0x97bf27] 
10 0x77e64b phantomjs() [0x77e64b] 
11 0x478dc4 phantomjs() [0x478dc4] 
12 0x47ad10 phantomjs() [0x47ad10] 
13 0x42d613 phantomjs() [0x42d613] 
14 0x425e34 phantomjs() [0x425e34] 
15 0x41b90c phantomjs() [0x41b90c] 
16 0x46ba0b phantomjs() [0x46ba0b] 
17 0x46c503 phantomjs() [0x46c503] 
18 0x7b6cad phantomjs() [0x7b6cad] 
19 0x17fd966 phantomjs() [0x17fd966] 
20 0x19db06e phantomjs() [0x19db06e] 
21 0x19e7b07 phantomjs() [0x19e7b07] 
22 0x19eed55 phantomjs() [0x19eed55] 
PhantomJS has crashed. Please read the bug reporting guide at 
<http://phantomjs.org/bug-reporting.html and file a bug report. 
+0

我懷疑進程內存不足,我很想知道哪些用例需要phantomJS容器才能運行多天? – CommodoreBeard

+0

我們有預定的服務來解析某種網站。例如每分鐘一次解析。 –

回答

0

很難說正在發生什麼。您可以使用--restart=unless-stopped運行您的容器。這會在容器失敗時重新啓動容器。

由於PhantomJS不再被維護,沒有人會在論壇上回答您的崩潰報告。所以最好從問題發生時就恢復到原來的狀態

+0

謝謝塔倫,我會試試'--restart-unless-stopped'選項。 –