SQL as well as Google sheet queries failing

Getting the error message 'request to http://172.20.20.98:80/api/runQuery failed, reason: socket hang up'. Happening at different parts of the runtime each time. No changes have been made to the app since the last successful run.

Hey @advaithmohan90! We’ve looked into this issue on our end and made a few tweaks- would you mind testing again now?

Thanks a lot!! That worked :slight_smile:

1 Like

Hey @alex-w - I’m seeing this issue with queries against a Postgresql resource today without having changed anything on my end. At first, I suspected that my db server was slow, but I can connect and query it without any issues. This thread leads me to believe there might still be something going on on Retool’s side?

For reference, the error I’m seeing is:
request to http://172.20.20.98:80/api/runQuery failed, reason: socket hang up

Hi Alex, the app has been working like a charm for the last month. But from today I’m getting the error “invalid json response body at http://172.20.20.98:80/api/runQuery reason: Unexpected token E in JSON at position 0” during runtime.

Ok it started working again. Only change I made was to switch off my VPN. Not sure how that could affect anything though.

Hi @alex-w,
I am getting same issue while haven't made any changes to query but getting “invalid json response body at http://172.20.20.98:80/api/runQuery reason: Unexpected token E in JSON at position 0” error. Also, when I run same query directly to SQL that work fine. Did anything change on retool side causing this issue?

@mjabbar

Would you mind showing a screenshot of your query?

Getting related, intermittent errors in one of our apps - are these related to this thread?

"invalid json response body at ``http://172.20.16.162:80/api/runQuery`` reason: Unexpected token E in JSON at position 0"

and

"request to ``http://172.20.16.162:80/api/runQuery`` failed, reason: socket hang up"

This is occurring in a PDF Exporter resource

@gaops_getaround

Hey :wave: We had a PDF exporter bug yesterday that should be fixed now, are you still seeing this behavior?

Fixed, thank you!

@lauren.gus
I am facing the same error right now when I am querying data from MongoDB. Can this be due to the huge size of my data?

Hi @SarthakM320, it seems like that error can appear for a due to a variety of reasons. Here's a link describing how to solve some of them. It appears that this error is common when parsing JSON. If you believe this error is being caused by your data size, are you able to try avoiding large datasets like pagination or filtering your data?

I had this issue as well with Retool responding very slowly and sometimes not being able to run queries or connect at all (PostgreSQL database with "socket hang up" error). What worked for me was to turn off SSL and then reactivate it again. Don't ask me why but you might try this.