Umbraco 6 distributed call, can't ping itself on startup
Hello,
We are currently using umbraco 6.1.1 on a load balanced environment. We have one authoring server and two production servers.
the umbracosettings.config is set like this on the authorig server... the prod servers don't have distributed call enabled.
<distributedCall enable="true">
<user>0</user>
<servers>
<server>web1</server>
<server>web2</server>
</servers>
</distributedCall>
It works fine this way... The problem is that when I add the authoring server to the loop (<server>auth</server>), there is no way to restart the authoring server.
After investigation, the process appears to freeze at this point
INFO Umbraco.Core.Sync.DefaultServerMessenger - [Thread 51] Submitting calls to distributed servers
Indeed it is trying to access the page
/umbraco/webservices/CacheRefresher.asmx
but this page is not accessible because it is waiting for the startup process to finish, which is waiting for the page to be available.... blabla
Any workaround or person who had this issue before?
Thanks for that - I tried fix but it didn't seem to work for us. In the end I had to write my own distributed call by hooking into some publishing events and calling URLs on the other servers to initiate a cache refresh.
Umbraco 6 distributed call, can't ping itself on startup
Hello,
We are currently using umbraco 6.1.1 on a load balanced environment. We have one authoring server and two production servers.
the umbracosettings.config is set like this on the authorig server... the prod servers don't have distributed call enabled.
<distributedCall enable="true">
<user>0</user>
<servers>
<server>web1</server>
<server>web2</server>
</servers>
</distributedCall>
It works fine this way... The problem is that when I add the authoring server to the loop (<server>auth</server>), there is no way to restart the authoring server.
After investigation, the process appears to freeze at this point
INFO Umbraco.Core.Sync.DefaultServerMessenger - [Thread 51] Submitting calls to distributed servers
Indeed it is trying to access the page
/umbraco/webservices/CacheRefresher.asmx
but this page is not accessible because it is waiting for the startup process to finish, which is waiting for the page to be available.... blabla
Any workaround or person who had this issue before?
I seem to be having the same issue - did you ever solve it?
We just solved it by patching the source code:
on Umbraco.Core\Sync\DefaultServerMessenger.cs
the original code was:
if (!_useDistributedCalls || !servers.Any())
{
//if we are not, then just invoke the call on the cache refresher
InvokeMethodOnRefresherInstance(refresher, dispatchType, getId, instances);
return;
}
we changed it this way:
InvokeMethodOnRefresherInstance(refresher, dispatchType, getId, instances);
if (!_useDistributedCalls || !servers.Any())
{
return;
}
(need to be done twice in the file)
what it is doing now is that the authoring server publish on his cache anyway, and then if required, start the distributed call.
then on the umbracosettings.config:
<distributedCall enable="true">
<user>0</user>
<servers>
<server>web1</server>
<server>web2</server>
</servers>
</distributedCall>
note that the authoring server is not pinging itself now but will be refreshed as if the distributed call was disabled.
The solution is not perfect because you might not want to refresh you authoring server.
Any comments?
Thanks for that - I tried fix but it didn't seem to work for us. In the end I had to write my own distributed call by hooking into some publishing events and calling URLs on the other servers to initiate a cache refresh.
Did you raise an bug with the devs?
Just added it http://issues.umbraco.org/issue/U4-3189 my changes of the source code are attached
Nice one :)
is working on a reply...