Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XP becomes unresponsive after use of management endpoint #8866

Closed
rymsha opened this issue Jun 2, 2021 · 2 comments
Closed

XP becomes unresponsive after use of management endpoint #8866

rymsha opened this issue Jun 2, 2021 · 2 comments
Assignees
Labels
Projects
Milestone

Comments

@rymsha
Copy link
Contributor

rymsha commented Jun 2, 2021

Thread dump shows that resteasy locks all threads

It happens when SSE is used extensively

@gbbirkisson
Copy link
Contributor

gbbirkisson commented Jun 3, 2021

This was observed in the operator. Here is a typical communication between the operator and XP:

GET /app/events HTTP/1.1
Accept: text/event-stream
Authorization: Basic c3U6c2Nvb2JlZG9v
Host: all.my-namespace.svc.cluster.local:4848
Connection: Keep-Alive
Accept-Encoding: gzip
User-Agent: okhttp/4.9.1

HTTP/1.1 200 OK
Date: Thu, 03 Jun 2021 07:38:16 GMT
Set-Cookie: JSESSIONID=1ezktbxlreaid1wltymdsamgk0; Path=/; HttpOnly; SameSite=Lax
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/event-stream
Transfer-Encoding: chunked

....

Replicating with curl:

$ curl -N \
     -H 'Accept: text/event-stream' \
     -H 'Authorization: Basic c3U6c2Nvb2JlZG9v' \
     -H 'Accept-Encoding: gzip' \
     -H 'Connection: Keep-Alive' \
     http://all.my-namespace.svc.cluster.local:4848/app/events
GET /app/events HTTP/1.1
Host: all.my-namespace.svc.cluster.local:4848
User-Agent: curl/7.76.1
Accept: text/event-stream
Authorization: Basic c3U6c2Nvb2JlZG9v
Accept-Encoding: gzip
Connection: Keep-Alive

HTTP/1.1 200 OK
Date: Thu, 03 Jun 2021 07:50:43 GMT
Set-Cookie: JSESSIONID=rrl02pxhpjda1cnjbx9yfq8rl5; Path=/; HttpOnly; SameSite=Lax
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/event-stream
Transfer-Encoding: chunked

...

@alansemenov alansemenov added this to the 7.7.0 milestone Jun 3, 2021
@rymsha rymsha added this to Needs triage in Bugs via automation Jun 3, 2021
@rymsha rymsha moved this from Needs triage to High priority in Bugs Jun 3, 2021
@rymsha
Copy link
Contributor Author

rymsha commented Jun 3, 2021

It appears that JaxRs wrapper uses old Servlet 2.5 "async simulator" that keeps holding a Jetty thread even when client disconnects from events stream. A attempt to send a single event to all those disconnected clients would free all stuck threads, but if events are rare, potentially all jetty threads get occupied.

Threads are no longer occupied by SSE requests when native "Servlet 3.0 Async" is in use.

@rymsha rymsha moved this from High priority to Closed in Bugs Jun 3, 2021
rymsha added a commit that referenced this issue Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Bugs
Closed
Development

No branches or pull requests

3 participants