Sign in to follow this  
jvavruska

Api Fails After 5 Calls

Recommended Posts

Hello,

 

I needed to establish identical structure of synced folders on several NAS units, so I wrote a small app to read list of folders and secrets from a file, call get_folders, then add_folder for each folder from the list not yet in BTSync setup.

 

Interestingly, only 5 api calls complete (1 get_folders and 4x add_folder), then it fails on HTTP 401 - Not Authorized. At this moment the utility exits. After restart, it skips already existing folders and adds 4 more, etc. 

 

It is running on QNAP TS-269Pro (QTS 4.0.5), btsync is 1.2.91 original i386 from BitTorrent download (not the broken binary distributed by QNAP).

 

Utility is written in python, using python 2.7, urllib and urrlib2. Password authentication is handled by creating urllib2.HTTPBasicAuthHandler() and using it in urllib2.build_opener(handler).

 

Does anybody have similar experience of API "getting tired" after few calls shortly following each other?

 

Thanks,

 

Jindra

 

 

 

 

Share this post


Link to post
Share on other sites

jvavruska,

 

Could you please send me your requests (including request #6 which fails) and the time interval between them? I'll try to repro it in my lab.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this