Forum Discussion

vishakhr's avatar
Occasional Contributor
3 years ago

swagger ui time out error

Hi Team,


We am using swagger UI integrated with our dev portal .. when using the "TRY OUT" option, our consumers are encountering  a "REQUEST TIME OUT 504" error ...the same end point works fine in POSTMAN with no time out error... how should i configure the TIMEOUT to be increased to minimum of 60sec atleast.


My code goes here:


window.swaggerUi = new SwaggerUi({
spec: specObj,
validatorUrl: null,
dom_id: "swagger-ui-container",
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
ReadTimeout: 120000,
ConnectTimeout: 120000,
onComplete: function(swaggerApi, swaggerUi) {....................................

5 Replies

  • Hi vishakhr 


    Timeouts can be because the consumer aren't able to reach the backend servers. 

    If you can reproduce it, take a look at the network logs in the browser's console to see what request is being made. And verify that it is the right request.


    • vishakhr's avatar
      Occasional Contributor

      Hi ponelat , Thanks for quick response, the request is able to reach backend server and our KIBANA logs is able to show the response time also... but since its taking around 20seconds, the TRYOUT option from swagger UI is showing "TIMEOUT" but its working fine from POSTMAN... hence our consumers are worried... let me know how can I increase the TIMEOUT  value from my swagger UI code