Max size for SQL request for segment?

I’m using SQL request to define segments. The given request is working well on console but not on Forest. I’m displayed the “cannot reach your data” message, only on this segment. Btw, the request also work in “Dashbord” while using SELECT COUNT (xxx.id) as value.

The request is a bit long (500 lines), is there a maximum limit for request-length for segment?

Thanks,

Guillaume

Hi @Guillaume,
Welcome to the Forest Admin community!

I am not sure this is a SQL query size limitation. Especially if the same query works to display a chart in a dashboard.

The “cannot reach your data” error message might be due to a request timeout (more than 30 seconds).
But it could come from something else.

Does your Admin API backend generate any error logs?
What is the approximate execution time for your SQL query?

Thanks for your help!

Hello @Guillaume,

Do you still observe this error?
If you do, can please tell us if:

Does your Admin API backend generate any error logs?
What is the approximate execution time for your SQL query?

Otherwise we should close this subject.

Thank you!

Hello

I had the answer from the CTO who checked on the log. It’s seems it’s a length issue :

Error: HTTP element QUERY_STRING is longer than the (1024 * 10) allowed length (was 10994)

There’s probably a way to simplify this request :wink:

Thanks for your help !

G.

2 Likes