Jumoo / uSync.Complete.Issues

Public Issue tracker and roadmap for uSync.Complete
https://jumoo.co.uk/usync/complete/
2 stars 1 forks source link

Server Timeout when pushing content from one environment to another #175

Closed imranhaidercogworks closed 2 years ago

imranhaidercogworks commented 2 years ago

Server Timeout when pushing content from one environment to another

I am trying to push my media and content (about 500 media files) from one environment to another, but run into a timeout error:

It manages to generate the report but the actually pushing fails

I tried updating my web.config to include a higher requestTimeout of 45mins and still have the same error

"500 - The request timed out. The web server failed to respond within the specified time." I'm using **Version (please complete the following information):** - Umbraco Version: [9.4.1] - uSync Version [9.3.1] - uSync.Complete Version [9.3.1] **To Reproduce** Steps to reproduce the behavior: 1. Go to a site with a lot of media and content 2. Go to Settings > uSync.Publisher 3. Select the site to push to, click "Push Settings" 4. Deselect all except media and content 5. Push 6. Once the report is generated continue to push **Expected behavior** I expect the media and content to push as it has done before (There's never been this many media files in previous working pushes) **Screenshots** ![image](https://user-images.githubusercontent.com/23234538/162227980-7923ef14-5f55-4f04-90e9-56ea91ffcc21.png)
KevinJump commented 2 years ago

Hi,

In theory the amout of media being pushed shouldn't change this 😞 . because the media is paged.

by default uSync will handle upto 50 items at a time and if for some reason that is taking to long you can hit the timeout. (just looking i am not sure if there is a default way to override the httptimeout of 100seconds, but we can do it on all our requests so will add something to the next release)

We have also seen recently that looked like a timeout, but was infact an network issue in between, (where i think a request got stalled on something like an internal proxy/firewall).

possible workaround

but mitigations you can do if it is slow: reduce the page size:

For example to knock the page size down to 25 (from the default 50) you can add the following to the appsettings.json file (you only need to change this on the server doing the pushing) . that will mean it will only push 25 items per request which should help (you can reduce this all the way down to 1 , but i think it will then be slower as there will be a lot of setup/teardown per request)

{
  "uSync": {
    "Publisher": {
      "Settings": {
        "IncomingEnabled": true,
        "OutgoingEnabled": true,
        "AppId": "****************",
        "AppKey": "****************",
        "PageSize": 25
     }
  }  
}

For the next release:

imranhaidercogworks commented 2 years ago

Thanks Kevin!

Changing default page size to 25 gave the same error, but I managed to successfully push when I lowered it to 15 👍🏼

Thanks again for the help, uSync.Complete is a lifesaver!!!

KevinJump commented 2 years ago

As of v9.4 the default value is now 25 timeout is 200 and for the pushing of actual media files 5