-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Upload hangs in HttpClient.PostRequest #147
Comments
Hi @Parasite03 . I also notice this kind of random hang when running the unit tests. Are you using a free or a pro account? |
@gpailler Free 50 GB account. DO you think that could be the issue? I recently had it happen on like the 10th upload though. |
I don't have any explanation for this issue for now. Sometimes, it just hangs indefinitely, without any response from the mega servers. I'm wondering if it's not a kind of API/Upload throttling... And each time I decide to spend some time to investigate, it works just fine 😒... |
Hm... I have them happening reliably, just not with a reliable rate (sometimes earler, other times later). I could mby set you up with my program? Also I have some suspicious that PC resource availability might have something to do with it, but it's just a guess and may be wrong. |
Sure, If you are willing to share a sample app to reproduce the problem, I'm interested to investigate deeper. |
Okay, so I stripped my program down as to not make you deal with random stuff and I was able to cause it to hang. it actually happened quite fast. So steps to reproduce:
I've included a couple sample pdfs and an excel file to load you can use. |
Thanks for the sample. I will try to reproduce and I will keep you posted |
Actually, I might have something. I tried setting the timeout to a finite number (100000) and it never hangds now. However, it also never throws and exception and I haven't seen a file that wasn't uploaded yet (although I may be mistaken). |
Okay, nevermind the last comment. It does make it work but only because you have a loop set up that retries it over and over until it eventually succeeds. Takes forever, though. |
Okay, now I get a ResourceNotExists every now and then.... |
I'm able to reproduce with your app. I will try to fix the issue and keep you posted. Thanks |
I had to buy a paid plan and now I don't seem to get the error anymore. Interesting. |
On my side, I tried several times this weekend but I'm not able to reproduce again. Still trying... |
@Parasite03, By any chance, could you try the nuget package from https://ci.appveyor.com/project/gpailler/megaapiclient/builds/33353633/artifacts ? I fixed an issue when PostRequest hangs when the mega servers return a 500 error. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Issue fixed on 1.8.2 |
Description:
I'm mass-uploading small files. It works well for about 500-600 of them, but then the program just hangs.
Actual Behavior:
Turns out that in HttpCLient.Post request at
HttpResponseMessage response = this.httpClient.PostAsync(url, content).Result
it just hangs. The response doesn't come
Expected Behavior:
The program works fine and keeps uploading files.
MegaApiClient Version: 1.8.1
The text was updated successfully, but these errors were encountered: