I have an application which is hosted in DC/OS instance, The application query the snowflake database and get the result. I am using snowflake sdk to to query the snowflake data base, we are also streaming the result we are getting from snowflake.
var statement = connection.execute({
sqlText: sql,
complete: function (err, stmt, rows) {
var stream = stmt.streamRows();
callback(err, stream, response);
}}
But if querying is large and the processing of query takes time in snowflake , I get 504 gateway timeout error at my client.although the node service is still running , but suppose I am hitting DC/OS from browser/postman I will get 504 timeout error here but snowflake returns result to my node service. What is the right strategy to avoid it ? this is the error which I am getting at my client from the server though my node service still maintains connection with snowflake and get the result from snowflake.