Skip to content

stackgres/auth/rbac/can-i 500 (Internal Server Error) - Too many xhr.js calls

Summary

Admin UI making too many xhr.js calls and stackgres-restapi pod unable to handle the requests. Start getting 500 Gateway time-out errors once there are more that 4 pending 'can-i` jobs.

Current Behaviour

After few minutes admin start getting "Gateway Time out" notification (in UI).

image

Steps to reproduce

Download and unzip: https://gitlab.com/ongresinc/stackgres/-/archive/1.2.1/stackgres-1.2.1.zip

Run following command

helm upgrade --install --namespace stackgres \
	--set authentication.password=pass \
	--set adminui.service.exposeHTTP=true \
	--set developer.extraOpts.JAVA_OPTS="-Xms512m -Xmx1024m" \
	--set developer.extraOpts.APP_OPTS="-Xms512m -Xmx1024m" \
	stackgres-operator ./stackgres-operator/ --version 1.2.1

oc -n stackgres create route edge admin-ui --service=stackgres-restapi --port=http --insecure-policy=Redirect

Expected Behaviour

Should not make new sets of xhr.js calls until last requests are completed.

Possible Solution

XHR.js call start requesting every 10s, Should be longer to let earlier requests to be completed. Or an option to update the values.

Environment

  • StackGres version: version 1.2.1

  • Kubernetes version: Openshift v4.6 with Kubernetes v1.19

Relevant logs and/or screenshots

chrome developer mode > network

image

chrome developer mode > console image

ERROR [io.stackgres.apiweb.exception.AbstractGenericExceptionMapper] (executor-thread-1) An error occurred in the REST API: org.jboss.resteasy.spi.ApplicationException: java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached

Edited by Matteo Melli