XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Rest api timeout, how to set timeout in xo-cli

    Scheduled Pinned Locked Moved REST API
    1 Posts 1 Posters 263 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jkrzyz
      last edited by

      Hi,

      I have problem like below:

      # time /usr/local/bin/xo-cli rest get /rest/v0/backups/logs filter="jobName:backup-job start:>1705222765000 start:<1705309165000" fields=status
      āœ– Error: HTTP connection has timed out
          at ClientRequest.<anonymous> (/usr/local/lib/node_modules/xo-cli/node_modules/http-request-plus/index.js:61:25)
          at ClientRequest.emit (node:events:514:28)
          at TLSSocket.emitRequestTimeout (node:_http_client:840:9)
          at Object.onceWrapper (node:events:628:28)
          at TLSSocket.emit (node:events:526:35)
          at Socket._onTimeout (node:net:589:8)
          at listOnTimeout (node:internal/timers:573:17)
          at process.processTimers (node:internal/timers:514:7) {
        originalUrl: 'https://hxo/rest/v0/backups/logs?filter=jobName%3A+backup-job+start%3A%3E1705222765000+start%3A%3C1705309165000&fields=status',
        url: 'https://hxo/rest/v0/backups/logs?filter=jobName%3A+backup-job+start%3A%3E1705222765000+start%3A%3C1705309165000&fields=status'
      }
      
      real	0m5.283s
      user	0m0.322s
      sys	0m0.134s
      

      It seems there is 5 sec timeout on server response.
      Is there any way to change this timeout?

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better šŸ’—

      Register Login
      • First post
        Last post