KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: If the 4D Server machines goes to sleep clients will have connectivity issues
PRODUCT: 4D | VERSION: 17 | PLATFORM: Mac & Win
Published On: October 8, 2018

If the machines hosting 4D Server goes to sleep then the 4D Clients will have connectivity issues. It is therefore very important to make sure that the Operating System energy saver settings are configured in such a way to ensure that the machine stays running.

If you are experiencing client disconnections or generical connectivity issues, it can be a good troubleshooting step to check whether or not the OS has been going to sleep.



On MacOS, you can check the system log and look for events that indicate the machine went to sleep, Some of those events may be:

2018-10-02 15:40:46.853378-0700 localhost securityd[85]: [com.apple.securityd:powerwatch] system will sleep
2018-10-02 15:40:46.854309-0700 localhost CommCenter[283]: (libIPTelephony.dylib) [com.apple.ipTelephony:ims] [power]: system will sleep
2018-10-02 15:40:46.854561-0700 localhost sharingd[331]: [com.apple.sharing:Daemon] Device will sleep
2018-10-02 15:40:46.854603-0700 localhost identityservicesd[325]: [com.apple.IDS:IDSDaemon] System going to sleep
2018-10-02 15:40:46.854607-0700 localhost sharingd[331]: [com.apple.sharing:Handoff] Stopping for user 501 on sleep

One way to find this information is to manually look through the console application. Another way to get this information is to search for it from Terminal.

The following terminal commands can be helpful for searching for this:
log show --style syslog | fgrep "going to sleep"

and
log show --style syslog | fgrep "will sleep"


The commands above should be run from Terminal on macOS.



On Windows, we can either look through the Event Viewer or use the PowerCFG application to get some additional details about sleep events (refered to as standby on Windows).

Using the Event Viewer we would want to look in the System log for events 41 and 107 logged by the Kernel-Power that would look like this:

and


Another useful event may be logged form the PowerTroubleshooter using Event ID 1:


Using the PowerCFG application, we can use the /SLEEPSTUDY option that generates a diagnostic system power transition report.

To run this report you need to have an Command prompt window that has been launched with elevated privileges (right-click Run as Administrator), then from that command prompt run the following:

powercfg /sleepstudy


The command output may look like this:
Sleep Study report saved to file path C:\WINDOWS\system32\sleepstudy-report.html.


Open the generated html file in a web browser and look for additional clues.

The top of the log may look like this:

In the example above, the machine had some abnormal shutdowns the day prior to the standby event. The abnormal shutdowns would have been clearly seen by the IT staff as the machine was complely shutdown, but the standby event may have gone less noticed.

Scrolling down through the report will reveal a section with the details of the standby event, which may look like this:


This information can be used to determine if the machine has in fact entered into a sleep or standby mode, which could be a source of many problems to a running database or application.