View source | Discuss this page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Add page
Show collection (0 pages)
Collections help

Search

Store Server Online and Offline Concepts

Contents


Online & Offline concepts of Store Servers

The connection status to the central server controls the 'online status' of a store server. If a central server can be reached and is not overloaded a store server is online, if it can't be reached a store server is offline. If the central server itself is down all store servers are offline also.


Online & Offline State Transitions

An Openbravo Commerce store server can go through several states:


StoreServer-Status.png


When the store server is transitioning to online or offline the WebPOS clients are not allowed to perform any transactions. In this case the user is notified and can relog in. Normally the transition period should be short, minutes. This 'blocking' behavior is by default switched of. To enable it you have to set the preference Multi Server Architecture Enablement to 'Y'. After changing this preference the system should be restarted as it caches the current value.


StoreServer-Offline-Transition-Status.png


Central Server Sensitivity Check

The sensitivity check determines if the central server is overloaded. This check is performed on the central server on request of a store server in the following cases:

The sensitivity check is a request from the store to the central server and is executed on the central server. The check compares the number of active database connections with a treshold. The treshold is defined in a preference Database Congestion Threshold which can be set on store level. If the number of active connections is higher than the treshold then the central server is considered to be overloaded. Also if the sensitivity request from the store to central server takes more than 10 seconds it is considered to be offline.

The sensitivity check is repeated at least once if it fails or if the central server is considered to be overloaded. To have the check executed multiple times set the Number of request retries done by the store server to a value higher than 1.

Causes for not going offline

There are several reasons why a store server will not go to offline status even if the central server is not available:

Conditions to transition to online

A store server has a background process which periodically checks if a store server can go online if the store server is offline. The process performs several checks before moving to transition to online status. Only if all the checks pass the system will go to the transition to online phase:

Causes for staying offline

The reasons for staying offline, i.e. failed transition to online are complementary to the checks done before transitioning to online. There can be several reasons that a store server is and remains offline:

The reason for a store server remaining offline can be found in the 'Offline Log/Cause' field in its mobile server window.


StoreServer-Offline-Log-Field.png


If there is a connection between central and store then this field is replicated from the store to the central server and can be checked there. If no connection between central and store then you can check this field in the relevant Mobile Server Definition record in the store server.

Currently 2 types of messages are shown in the offline log field:

Transitioning Triggers - Send Transition to Online

Transition to online and offline is triggered by different events.

An online server communicates with the central server frequently for example when creating tickets (in synchronized mode). When the communication fails or the server responds with a server error then the store server will do a check availability request. If that request fails (at least twice) then the central server is assumed to be not available and the store server will transition to offline.

An offline server will test the connection to the central server at regular intervals (see previous section). If the checks to go online all pass the store server will try to transition to online. If the transition to online fails then the store server will move back to offline and wait a certain time period (Transition to offline wait time) before retrying.

Another way to trigger a server to transition to online is to send it a transition to online trigger. This can be done from the central server by going to the mobile server window, selecting the offline server and then clicking the 'Send Transition to Online' button.


StoreServer-Send-Transition-To-Online.png


Clicking this button will trigger a transition to online (which can fail), depending on the situation the store server transitions to online after a few minutes.

Retrieved from "http://wiki.openbravo.com/wiki/Store_Server_Online_and_Offline_Concepts"

This page has been accessed 1,927 times. This page was last modified on 12 June 2019, at 20:36. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.