hue icon indicating copy to clipboard operation
hue copied to clipboard

"Results have expired, rerun the query if needed"

Open jerryleooo opened this issue 2 years ago • 12 comments
trafficstars

Describe the bug:

Global variables are not shared between different gunicorn workers. https://github.com/cloudera/hue/blob/b5d126ea651d76e982a13c7da3661dac9a939246/desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py#L90

Steps to reproduce it?

  1. Use the docker-compose to up the service, with following configurations:
gunicorn_work_class=eventlet
gunicorn_number_of_workers=8
  1. configure an interpreter with Athena/Trino/Presto + sqlalchemy
  2. use 2 different browser tabs to submit queries in editor, and you may see the Results have expired, rerun the query if needed. error

Hue version or source?

open source 4.10.0

jerryleooo avatar Jan 14 '23 10:01 jerryleooo

I too observed similar issue with Trino

sbbagal13 avatar Jan 18 '23 22:01 sbbagal13

Hi @jerryleooo, thanks for reporting this. Do you know if this happens with other interpreters as well?

@Harshg999 can you have a look?

bjornalm avatar Jan 19 '23 08:01 bjornalm

Hi @bjornalm I haven't tried other interpreters, later i may try jdbc and update here

jerryleooo avatar Jan 20 '23 06:01 jerryleooo

This issue is stale because it has been open 30 days with no activity and is not labeled "Prevent stale". Remove "stale" label or comment or this will be closed in 10 days.

github-actions[bot] avatar Mar 19 '23 02:03 github-actions[bot]

Is it resolved in recent release or do we need to change the interpreter for this ? CC: @bjornalm @Harshg999

sbbagal13 avatar Mar 30 '23 23:03 sbbagal13

I too observed similar issue with Trino, which is connected through a VPC endpoint.

Is there a known workaround to this?

vpattar avatar Apr 26 '23 01:04 vpattar

@vpattar now I use gunicorn_work_class=sync and gunicorn_number_of_workers=1, and running 3 instances behind a LB

jerryleooo avatar Apr 26 '23 05:04 jerryleooo

With Gunicorn now, we need to relook and scope how to share global variable state. I've created an internal roadmap item for this issue and will take it up for subsequent releases. Thanks for flagging this @jerryleooo.

Harshg999 avatar May 17 '23 13:05 Harshg999

This issue is stale because it has been open 30 days with no activity and is not labeled "Prevent stale". Remove "stale" label or comment or this will be closed in 10 days.

github-actions[bot] avatar Jun 17 '23 01:06 github-actions[bot]

I also met this error using StarRocks(compatible with mysql protocol), and when i used the mysql JDBC configuration way, it worked and returned query results. Maybe the sqlalchemy way has some session or connection bugs.

You can also try the JDBC way(need to upload JDK and execute $HUE_HOME/build/env/bin/pip install py4j ahead): https://docs.gethue.com/administrator/configuration/connectors/#mysql

hackeryang avatar Jul 31 '24 08:07 hackeryang