question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SPIKE - determine how to utilize the umbracoServer table to store lastsynced.txt info

See original GitHub issue

Currently we store a text file locally: App_Data/DistCache/lastsycned.txt which stores an INT id of the last cache instruction read from the database which allows for flexible load balancing to work along with ensuring the in-memory cache is robust even between appdomain restarts and overlapping appdomains during restarts.

It would however be better if we stored this value in the database directly instead of on disk. For LB and Azure scenarios, this file is normally located on the local fast drive or local %temp% drive. This is because this value is specific to the server/IIS site running the website, not the website itself. In some cases if the local fast drive is not available, it means this file cannot be read and a cold boot will take place which is not ideal. Another problem with storing as a file is that you cannot easily force a cold boot on a particular server without accessing the server’s files directly and removing this file whereas if it were in the db you could centrally control this.

This task is determine the sub tasks it will take in order to achieve this. We would need to store a website identifier in the database that is unique to the IIS website, normally we would do this as a hash of the MachineName + AppDomainAppId which i think would be sufficient in all cases. The value stored in the umbracoServer table is this combination IIRC, the value looks like TEAMCANADA3//LM/W3SVC/18/ROOT so I think we are already storing this unique identifier correctly.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Jeavoncommented, Mar 11, 2019

You would need to consider scenarios where the DatabaseServerRegistrar has been replaced and so the umbracoServer table isn’t in use. Slave servers also may have readonly access to the database.

0reactions
Shazwazzacommented, Apr 15, 2019

Good effort, have created sub tasks for those items.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found