function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
HR Integrator HavilandHR Integrator Haviland 

Site Pages go "Under Construction" Unpredictably Unitl Pages are viewed Internally

We purchased a Salesforce Org to provide HR services to a Client. Part of the service uses Sites. The Pages on the Site go from being active and operational to displaying the "Under Construction" Page and not being accessible about once a day "naturally" or whenever we deploy a Change Set. And by "naturally", I mean that the issue occurs on its own without us changing any Metadata. 

The client actively uses the Site, and this is causing frustration when they keep getting the "Under Construction" Page. We may lose the Client. We have been trying to monitor this issue and catch it before the Client receives the "Under Construction" Page by accessing the Site every 30 minutes around the clock.  What we are finding is that it tends to be inaccessible in the early mornings.  However, we did just have it become inacessible at 2:50pm today.  

When the issue occurs, we have a method to temporarily fix the situation: (1) Go to Setup --> Develop --> Apex Classes --> Compile All Classes then (2) visit each and every Page used in the Site Internally via /apex/[Page Name]. Once a Page used in the Site is visited Internally, it immediately becomes available Externally on the Site. So to reiterate, to make the whole Site available again, we must visit each and every Page used in the Site Internally.

When the issue has occurred, I went to the Site record and clicked "Preview as Admin". The page will display the "Under Construction" Page and display an "Entity is not api accessible" Exception.

I've checked and double-checked that the Site's Guest User Profile has all all the required Visualforce, Apex Class, Object, and Field Permissions. When the Site is up, everything is working properly.

When this error occurs "naturally" / on its own, it seems to only occur once per day. Could it be with Salesforce resetting the Site's 24 Usage Limits?

I've posted this issue on Salesforce Stack Exchange, but I've gotten no answers to this issue.
http://salesforce.stackexchange.com/questions/85493/site-goes-under-construction-or-unauthorized-until-page-is-viewed-internally?noredirect=1#comment114047_85493
ShashankShashank (Salesforce Developers) 
I see that the stackexchange post has been answered. Please let me know if you have any further questions.