MachinePublishers / jBrowserDriver

A programmable, embeddable web browser driver compatible with the Selenium WebDriver spec -- headless, WebKit-based, pure Java
Other
809 stars 143 forks source link

Slow under tomcat #366

Open dgoiko opened 4 years ago

dgoiko commented 4 years ago

When executing this as a normal java aplication, everything goes well, however,. if I call it from tomcat, the browser becomes slow as hell. It gets stuck after logging this:


2020-05-20T11:41:58.384][Instance 4][Port 60074] 2020-05-20 13:41:58,384 DEBUG conn.LoggingManagedHttpClientConnection (LoggingManagedHttpClientConnection.java:122) - http-outgoing-12 << HTTP/1.1 201 Created
[2020-05-20T11:41:58.384][Instance 4][Port 60074] 2020-05-20 13:41:58,384 DEBUG conn.LoggingManagedHttpClientConnection (LoggingManagedHttpClientConnection.java:125) - http-outgoing-12 << Content-Length: 17
[2020-05-20T11:41:58.384][Instance 4][Port 60074] 2020-05-20 13:41:58,384 DEBUG conn.LoggingManagedHttpClientConnection (LoggingManagedHttpClientConnection.java:125) - http-outgoing-12 << Date: Wed, 20 May 2020 11:41:57 GMT
[2020-05-20T11:41:58.384][Instance 4][Port 60074] 2020-05-20 13:41:58,384 DEBUG conn.LoggingManagedHttpClientConnection (LoggingManagedHttpClientConnection.java:125) - http-outgoing-12 << Connection: keep-alive
[2020-05-20T11:41:58.384][Instance 4][Port 60074] 2020-05-20 13:41:58,384 DEBUG conn.LoggingManagedHttpClientConnection (LoggingManagedHttpClientConnection.java:125) - http-outgoing-12 << Content-Type: application/json
[2020-05-20T11:41:58.384][Instance 4][Port 60074] 2020-05-20 13:41:58,384 DEBUG conn.LoggingManagedHttpClientConnection (LoggingManagedHttpClientConnection.java:125) - http-outgoing-12 << Vary: Origin
[2020-05-20T11:41:58.384][Instance 4][Port 60074] 2020-05-20 13:41:58,384 DEBUG conn.LoggingManagedHttpClientConnection (LoggingManagedHttpClientConnection.java:125) - http-outgoing-12 << Access-Control-Allow-Credentials: true
[2020-05-20T11:41:58.384][Instance 4][Port 60074] 2020-05-20 13:41:58,384 DEBUG conn.LoggingManagedHttpClientConnection (LoggingManagedHttpClientConnection.java:125) - http-outgoing-12 << Access-Control-Allow-Origin: https://cuenta.elcorteingles.es
[2020-05-20T11:41:58.384][Instance 4][Port 60074] 2020-05-20 13:41:58,384 DEBUG conn.LoggingManagedHttpClientConnection (LoggingManagedHttpClientConnection.java:125) - http-outgoing-12 << Access-Control-Allow-Headers: Content-Type
[2020-05-20T11:41:58.384][Instance 4][Port 60074] 2020-05-20 13:41:58,384 DEBUG conn.LoggingManagedHttpClientConnection (LoggingManagedHttpClientConnection.java:125) - http-outgoing-12 << Set-Cookie: _abck=AB62992A6653DFA66EF7DD75562029F3~-1~YAAQxdMRAjafawByAQAANOLjMQPUTB1fBkHci9EafFQA2wgHssLjIO6ZlzwD2uGMdHqtpTEv2qaTVQJdi8lMtDC5yn1GaD5Z/oz/7hGQOHrRZM+1wF3F1KrlXGoiPbukpzIG4EzwdmX08r9MXuur7zG+upIwNaOderKWXbfwNal0UGrUYZcU7qjsjztc7Jz0si7AGA8wwfvOjbq++HEbDcsvanRVOy3Y7Lt7a9ayKI3Gm/skQcoe2XBQRFCGqbbDKQZZxOwLBCGSioB8sUTy5XOjRAmOia1wnq56T8Xh8Fi6V8tnM5hUJOLuJOtkvuOmhlz81UrF6bfWUCDW4qw=~-1~-1~-1; Domain=.elcorteingles.es; Path=/; Expires=Thu, 20 May 2021 11:41:57 GMT; Max-Age=31536000; Secure
[2020-05-20T11:41:58.384][Instance 4][Port 60074] 2020-05-20 13:41:58,384 DEBUG execchain.MainClientExec (MainClientExec.java:285) - Connection can be kept alive indefinitely
[2020-05-20T11:41:58.386][Instance 4][Port 60074] 2020-05-20 13:41:58,386 DEBUG protocol.ResponseProcessCookies (ResponseProcessCookies.java:119) - Cookie accepted [_abck="AB62992A6653DFA66EF7DD75562029F3~-1~YAAQxdMRAjafawByAQAANOLjMQPUTB1fBkHci9EafFQA2wgHssLjIO6ZlzwD2uGM...", version:0, domain:elcorteingles.es, path:/, expiry:Thu May 20 13:41:57 CEST 2021]
[2020-05-20T11:41:58.386][Instance 4][Port 60074] 2020-05-20 13:41:58,386 DEBUG conn.PoolingHttpClientConnectionManager (PoolingHttpClientConnectionManager.java:342) - Connection [id: 12][route: {s}->https://cuenta.elcorteingles.es:443] can be kept alive indefinitely
[2020-05-20T11:41:58.386][Instance 4][Port 60074] 2020-05-20 13:41:58,386 DEBUG conn.LoggingManagedHttpClientConnection (LoggingManagedHttpClientConnection.java:88) - http-outgoing-12: set socket timeout to 0
[2020-05-20T11:41:58.386][Instance 4][Port 60074] 2020-05-20 13:41:58,386 DEBUG conn.PoolingHttpClientConnectionManager (PoolingHttpClientConnectionManager.java:349) - Connection released: [id: 12][route: {s}->https://cuenta.elcorteingles.es:443][total kept alive: 16; route allocated: 2 of 8; total allocated: 17 of 300]

And takes 1-5 minutes to resume on its own.