Web Deployment Tool (MS Deploy)
ERROR_EXCEEDED_MAX_SITE_CONNECTIONS web deployment task failed.
Last post Nov 07, 2018 12:09 PM by braincraze
Oct 30, 2018 02:14 PM|braincraze|LINK
when trying to publish my website, the developer command prompt gives me this error (see title). the script i am trying to publish with is as follows:
msbuild C:\Projects\Apps\MyApp\MyApp.Web\MyApp.Web.csproj /p:PublishProfile="C:\Projects\Apps\MyApp\MyApp.Web\Properties\PublishProfiles\CustomProfile.pubxml" /p:DeployOnBuild=true;Username=name;Password=pass -v:diag /nr:false
I am aware that there exists a post with pretty much the same name from 3 years ago, but with no solution.
is there a flag i need to set which i am unaware of to close the connection after successful or failed build?
when deploying with the build in visual studio 2017 community edition publish tool, it seems to automatically close the connection afterwards
edit: the error message also tells me to find a solution at http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEEDED_MAX_SITE_CONNECTIONS
which apparently does not exist.
Oct 31, 2018 06:23 AM|Brando Zhang|LINK
According to your description, I suggest you could try to limit connection via MSBuild.
msbuild.exe mysln.sln /maxcpucount:3
The "maxcpucount" limits the MSBuild threads, thus limit how many projects can be published at the same time. If it is not defined, MSBuild will actually use up to the number of processors on the computer.
More details, you could refer to below article.
Nov 07, 2018 12:09 PM|braincraze|LINK
thank you for your reply however i dont see how limiting the connections will help me, when there is no problem with deploying projects at the same time.
the problem as stated above lies in the connection not being closed after the publish fails (i know i've written that it doesnt close the connection neither on success nor fail, but i've since come to the conclusion, that this only happens on publish fails).
the result of that being that the next publish try will fail because of max connections. limiting the connections even further would just have the publish fail earlier.. or am i wrong in that one?
also as stated above, unlimiting the connections would not be an option because that would in the end clog the server completely some time down the line.
i never publish projects at the same time.