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

Dekart stop working with no error messages (deadlock) #25

Closed
philipmargeotab opened this issue Jan 12, 2022 · 9 comments
Closed

Dekart stop working with no error messages (deadlock) #25

philipmargeotab opened this issue Jan 12, 2022 · 9 comments

Comments

@philipmargeotab
Copy link

Our team set up Dekart.xyz on our own GCP using the instructions provided in https://dekart.xyz/docs/self-hosting/app-engine/, using Google App Engine. However, an issue we are running into is - whenever we run an invalid query, no error message comes up (either in Dekart or in the docker logs), and we have to reset the docker image every time, and only then do we see the error message. Is there better error handling available that doesn't cause Dekart to crash every time we submit a query with syntax or permissions errors (e.g. a column doesn't exist, or a user doesn't have permission to a table). The crash also prevents users from returning to the home 'reports' screen. It goes completely blank.

@philipmargeotab
Copy link
Author

Some example errors (with identifying data removed):

googleapi: Error 403: Access Denied
googleapi: Error 404: Not found
googleapi: Error 400: Unrecognized name

these errors caused the self-hosted website to crash.

@delfrrr
Copy link
Contributor

delfrrr commented Jan 15, 2022

Hey @philipmargeotab will try to help you. I'm running Dekart instance on GCP for the Playground, so it should be possible.

Can you please tell:

  • which version do you use
  • copy here app.yaml (without sensitive details of course)

Also can you please set DEKART_LOG_DEBUG: "1" in env_variables and share here logs

@philipmargeotab
Copy link
Author

philipmargeotab commented Jan 16, 2022

Version is 0.7
###

# https://cloud.google.com/appengine/docs/flexible/custom-runtimes/configuring-your-app-with-app-yaml#intro
service: dekart-test
runtime: custom
env: flex

manual_scaling:
instances: 1 # important as dekart designed to work on single instance

resources:
memory_gb: 64.0 # recommended to handle up to 1M points
cpu: 16
disk_size_gb: 100

env_variables:
DEKART_LOG_DEBUG: "1"
DEKART_POSTGRES_DB: "xxxxxx"
DEKART_POSTGRES_USER: "xxxxxx"
DEKART_POSTGRES_PASSWORD: "xxxxxx"
DEKART_POSTGRES_PORT: "xxxx"
# see https://cloud.google.com/sql/docs/mysql/connect-app-engine-flexible
DEKART_POSTGRES_HOST: "10.x.x.x" # UNKNOWN
DEKART_CLOUD_STORAGE_BUCKET: "geotab-dekart-test" # "$BUCKET"
DEKART_BIGQUERY_PROJECT_ID: "test-xx" # "$PROJECT_ID"
DEKART_MAPBOX_TOKEN: "pk.eyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" #
# "$MAPBOX_TOKEN"

beta_settings:
# see https://cloud.google.com/sql/docs/mysql/connect-app-engine-flexible
cloud_sql_instances: "test-xx:europe-west1:dekart-db=tcp:xxxx"
# "$PROJECT_ID:europe-west1:$DB_INSTANCE_NAME=tcp:xxxx"

###

@delfrrr
Copy link
Contributor

delfrrr commented Jan 16, 2022

Hey I think I did manage to reproduce problem, will keep you posted here

@delfrrr
Copy link
Contributor

delfrrr commented Jan 17, 2022

I was able to reproduce dead lock here https://github.com/dekart-xyz/dekart/blob/v0.7.0/src/server/report/report.go#L36
Getting my head around it

@delfrrr
Copy link
Contributor

delfrrr commented Jan 21, 2022

Hey so I believe that problem was with a deadlock. In Dekart there is of course a lot error handling but deadlock formally is not an error. It's not easy to reproduce locally.

I found few potential issues in the code and address them d4395ce

@philipmargeotab could you pease update Dekart to 0.7.2 and share a feedback if issue still reproducing

@philipmargeotab
Copy link
Author

Yes it appears to work now; no more deadlock. Thank you!

@delfrrr delfrrr changed the title No error handling for self-hosted Dekart Dekart stop working with no error messages (deadlock) Jan 22, 2022
@delfrrr
Copy link
Contributor

delfrrr commented Jan 22, 2022

Great!

@delfrrr
Copy link
Contributor

delfrrr commented Jan 22, 2022

Fixed in 0.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants