ninxsoft / Kmart

A Mac command-line tool that generates kick-ass Jamf Pro reports.
MIT License
142 stars 12 forks source link

Timeouts when running kmart #8

Closed rthaley closed 3 years ago

rthaley commented 3 years ago

When attempting to run kmart I am getting "The Request Timed Out" messages when it appears to parsing larger groups of info from jamf. I did not have the issue with the dev environment, which is significantly smaller.

✅ [2021-06-16 12:47:47 +0000] - Performing lookups for Buildings: 8.9 seconds
✅ [2021-06-16 12:47:56 +0000] - Performing lookups for Categories: 122.7 seconds
✅ [2021-06-16 12:49:59 +0000] - Performing lookups for Departments: 1.3 seconds
✅ [2021-06-16 12:50:00 +0000] - Performing lookups for eBooks: 1.3 seconds
✅ [2021-06-16 12:50:01 +0000] - Performing lookups for Mac Advanced Searches:⛔️ [2021-06-16 12:53:15 +0000] - The request timed out.
⛔️ [2021-06-16 12:54:34 +0000] - The request timed out.
⛔️ [2021-06-16 12:59:15 +0000] - The request timed out.
ninxsoft commented 3 years ago

Sounds like an opportunity to customise the timeout values!

Quick research indicates I can customise timeoutInterval timeoutIntervalForRequest values, both of which are set to 60 seconds by default.

Are you able to gauge how long the requests are running for before they time out?

rthaley commented 3 years ago

From what I can tell I'm seeing anywhere from 3-5 minutes before timeout occurs in my environment. I'm basing that on the output from kmart in the command line. Thanks for looking into this!

ninxsoft commented 3 years ago

Adding and option to change the api_timeout value, in seconds, however the default value is 60 seconds.

@rthaley are you still having this issue?

ninxsoft commented 3 years ago

Closing due to inactivity.