2
votes

I'm using Marklogic 8.0.6 and xquery requests.

I execute those xquery request through an app server but it seems that huge requests are reaching the timeout and return the following error :

eval XQuery on server: cannot process response with 504 status

Could you please give the setting to modify in order to increase this timeout ?

Thanks, Romain :)

1

1 Answers

5
votes

Timeouts are often a sign that the query is doing things inefficiently (not leveraging indexes, filtering, etc.).

Be sure to look at profiling the query (click the Profile tab in Query Console and run), using xdmp:plan(), etc. and review the Query Performance and Tuning Guide

If you are returning an extremely large number of documents, look to use pagination and grab smaller sets of documents with multiple requests, or maybe use a batch processing tool or framework, such as the Java Data Movement SDK, CORB, or MarkLogic Spring Batch.

That being said, to set the timeout for a request, use xdmp:set-request-time-limit()

xdmp:set-request-time-limit(600)