Large SQL query from 4DClient: Stack size error

17r5 client/server, MSWindows
I have a large SQL query: it’s basic, but has a WHERE MyTableID in ( 1, 2, 5, 10, 15, {etc 4200+ values} ).

When I execute the query from a client, I hit this error stack list:
1267: dbmg: Stack Overflow
1201: dbmg: Query cannot be analyzed
1813: SQLS: Failed to execute WHERE clause.
1801: SQLS: Failed to execute SELECT command.
1837: SQLS: Stack Overflow
1837: SQLS: Stack Overflow

If I run in single-user, because I set a large stack size for the process: I don’t have a problem.

My challenge is that this gets run from a batch-workstation client: and I don’t think there’s a configure the server side process stack size: so, I’m stuck.

Is there a way in client/server to specify a server-side stack size for the process?

I don’t know if it will in any way help but since you mention server stack size,

how about database parameter #53

https://doc.4d.com/4Dv15/4D/15.6/SET-DATABASE-PARAMETER.301-3817903.en.html

it was used in early v11 (because the 64-bit server didn’t exist yet)
to reduce the memory footprint per client and increase the upper limit of max. client connections.