diff --git a/src-db/database/sourcedata/AD_REF_LIST.xml b/src-db/database/sourcedata/AD_REF_LIST.xml
--- a/src-db/database/sourcedata/AD_REF_LIST.xml
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml
@@ -65,7 +65,7 @@
 <!--17726FF020AF4D1EAC31EE81BBF66A9A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--17726FF020AF4D1EAC31EE81BBF66A9A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--17726FF020AF4D1EAC31EE81BBF66A9A-->  <VALUE><![CDATA[OBMOBC_READ_TIMEOUT_REQUEST]]></VALUE>
-<!--17726FF020AF4D1EAC31EE81BBF66A9A-->  <NAME><![CDATA[Server to Server Request Read Time Out (minutes)]]></NAME>
+<!--17726FF020AF4D1EAC31EE81BBF66A9A-->  <NAME><![CDATA[Server to Server Request Read Time Out (seconds)]]></NAME>
 <!--17726FF020AF4D1EAC31EE81BBF66A9A-->  <DESCRIPTION><![CDATA[Read time out for requests from server to server]]></DESCRIPTION>
 <!--17726FF020AF4D1EAC31EE81BBF66A9A-->  <AD_REFERENCE_ID><![CDATA[A26BA480E2014707B47257024C3CBFF7]]></AD_REFERENCE_ID>
 <!--17726FF020AF4D1EAC31EE81BBF66A9A-->  <AD_MODULE_ID><![CDATA[08943B85ADF64E708797A753E5B6AAEE]]></AD_MODULE_ID>
@@ -293,6 +293,18 @@
 <!--516767C4E66841CEB0C386294BB2D977-->  <AD_MODULE_ID><![CDATA[08943B85ADF64E708797A753E5B6AAEE]]></AD_MODULE_ID>
 <!--516767C4E66841CEB0C386294BB2D977--></AD_REF_LIST>
 
+<!--4D48EBAFA06C44F3977432051A509202--><AD_REF_LIST>
+<!--4D48EBAFA06C44F3977432051A509202-->  <AD_REF_LIST_ID><![CDATA[4D48EBAFA06C44F3977432051A509202]]></AD_REF_LIST_ID>
+<!--4D48EBAFA06C44F3977432051A509202-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4D48EBAFA06C44F3977432051A509202-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4D48EBAFA06C44F3977432051A509202-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4D48EBAFA06C44F3977432051A509202-->  <VALUE><![CDATA[OBMOBC_NumberOfRequestRetries_SS]]></VALUE>
+<!--4D48EBAFA06C44F3977432051A509202-->  <NAME><![CDATA[Number of store server request retries]]></NAME>
+<!--4D48EBAFA06C44F3977432051A509202-->  <DESCRIPTION><![CDATA[Number of request retries done by the store server to the central server before the store server is considered to be offline.]]></DESCRIPTION>
+<!--4D48EBAFA06C44F3977432051A509202-->  <AD_REFERENCE_ID><![CDATA[A26BA480E2014707B47257024C3CBFF7]]></AD_REFERENCE_ID>
+<!--4D48EBAFA06C44F3977432051A509202-->  <AD_MODULE_ID><![CDATA[08943B85ADF64E708797A753E5B6AAEE]]></AD_MODULE_ID>
+<!--4D48EBAFA06C44F3977432051A509202--></AD_REF_LIST>
+
 <!--645E9EE10111462CB8C4E6B9E504CEA3--><AD_REF_LIST>
 <!--645E9EE10111462CB8C4E6B9E504CEA3-->  <AD_REF_LIST_ID><![CDATA[645E9EE10111462CB8C4E6B9E504CEA3]]></AD_REF_LIST_ID>
 <!--645E9EE10111462CB8C4E6B9E504CEA3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -326,6 +338,18 @@
 <!--7A639D0FD6DE41838D9EAA11D5A46808-->  <AD_MODULE_ID><![CDATA[08943B85ADF64E708797A753E5B6AAEE]]></AD_MODULE_ID>
 <!--7A639D0FD6DE41838D9EAA11D5A46808--></AD_REF_LIST>
 
+<!--689EF911E0B54024B9EBC4A1027F0748--><AD_REF_LIST>
+<!--689EF911E0B54024B9EBC4A1027F0748-->  <AD_REF_LIST_ID><![CDATA[689EF911E0B54024B9EBC4A1027F0748]]></AD_REF_LIST_ID>
+<!--689EF911E0B54024B9EBC4A1027F0748-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--689EF911E0B54024B9EBC4A1027F0748-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--689EF911E0B54024B9EBC4A1027F0748-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--689EF911E0B54024B9EBC4A1027F0748-->  <VALUE><![CDATA[OBMOBC_DatabaseCongestionThreshold]]></VALUE>
+<!--689EF911E0B54024B9EBC4A1027F0748-->  <NAME><![CDATA[Database Congestion Threshold]]></NAME>
+<!--689EF911E0B54024B9EBC4A1027F0748-->  <DESCRIPTION><![CDATA[Maximum number of Database connections allowed before considering the server congested]]></DESCRIPTION>
+<!--689EF911E0B54024B9EBC4A1027F0748-->  <AD_REFERENCE_ID><![CDATA[A26BA480E2014707B47257024C3CBFF7]]></AD_REFERENCE_ID>
+<!--689EF911E0B54024B9EBC4A1027F0748-->  <AD_MODULE_ID><![CDATA[08943B85ADF64E708797A753E5B6AAEE]]></AD_MODULE_ID>
+<!--689EF911E0B54024B9EBC4A1027F0748--></AD_REF_LIST>
+
 <!--8083570E91F7450B8833424FDBD140D2--><AD_REF_LIST>
 <!--8083570E91F7450B8833424FDBD140D2-->  <AD_REF_LIST_ID><![CDATA[8083570E91F7450B8833424FDBD140D2]]></AD_REF_LIST_ID>
 <!--8083570E91F7450B8833424FDBD140D2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff --git a/src/org/openbravo/mobile/core/servercontroller/CheckServerAvailability.java b/src/org/openbravo/mobile/core/servercontroller/CheckServerAvailability.java
--- a/src/org/openbravo/mobile/core/servercontroller/CheckServerAvailability.java
+++ b/src/org/openbravo/mobile/core/servercontroller/CheckServerAvailability.java
@@ -1,6 +1,6 @@
 /*
  ************************************************************************************
- * Copyright (C) 2018 Openbravo S.L.U.
+ * Copyright (C) 2018-2019 Openbravo S.L.U.
  * Licensed under the Openbravo Commercial License version 1.0
  * You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
  * or in the legal folder of this module distribution.
@@ -9,10 +9,17 @@
 
 package org.openbravo.mobile.core.servercontroller;
 
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
 import javax.servlet.ServletException;
 
+import org.apache.log4j.Logger;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.mobile.core.process.JSONProcessSimple;
 import org.openbravo.model.common.enterprise.Organization;
@@ -20,23 +27,80 @@
 /**
  * Process that will be invoked by a remote server to check the availability of the current server
  * 
- * It just does a quick database check. If the remove server receives the OK response, it will
- * assume that the current server is available
+ * It checks the number of connections in the DB. If this number if above certain threshold, then
+ * the server is considered as congested and hence not available. Note that in Oracle databases, a
+ * simple query will be performed instead of the check mentioned above.
+ * 
  */
 public class CheckServerAvailability extends JSONProcessSimple {
 
+  private static int MAX_DB_CONNECTIONS = 0;
+  private static final Logger log = Logger.getLogger(MobileMainServerCheck.class);
+
+  private boolean isPostgreSQL = "POSTGRE".equals(
+      OBPropertiesProvider.getInstance().getOpenbravoProperties().getProperty("bbdd.rdbms"));
+
   @Override
   public JSONObject exec(JSONObject jsonsent) throws JSONException, ServletException {
     JSONObject response = new JSONObject();
     String status = null;
     try {
-      // Do a quick database check to ensure it responds
-      Organization organization = OBDal.getInstance().get(Organization.class, "0");
-      status = organization != null ? "OK" : "NOK";
+      status = checkAvailabilityByDatabaseCongestion();
     } catch (Exception e) {
       status = "NOK";
     }
     response.put("serverStatus", status);
     return response;
   }
+
+  private String checkAvailabilityByDatabaseCongestion() throws Exception {
+    if (isPostgreSQL) {
+      int count = queryIntValue("select count(*) from pg_stat_activity where state != 'idle'");
+      int threshold = getDatabaseCongestionThreshold();
+      log.info("Checking DB congestion by number of active connections: {" + count + "}. Max: {"
+          + threshold + "}");
+
+      if (count <= threshold) {
+        return "OK";
+      }
+      return "NOK";
+    } else {
+      return checkAvailabilityUsingOrgQuery();
+    }
+  }
+
+  private int getDatabaseCongestionThreshold() throws Exception {
+    return MobileServerUtils.getIntegerPreference("OBMOBC_DatabaseCongestionThreshold",
+        getMaxConnectionsDefaultValue());
+  }
+
+  private int getMaxConnectionsDefaultValue() throws Exception {
+    return (int) (getMaxDbConnections() * 0.8);
+  }
+
+  private int getMaxDbConnections() throws Exception {
+    if (MAX_DB_CONNECTIONS == 0) {
+      MAX_DB_CONNECTIONS = queryIntValue("SELECT current_setting('max_connections')");
+    }
+
+    return MAX_DB_CONNECTIONS;
+  }
+
+  private int queryIntValue(String query) throws Exception {
+    Connection con = OBDal.getInstance().getConnection();
+    try (PreparedStatement statement = con.prepareStatement(query);
+        ResultSet result = statement.executeQuery()) {
+      if (result.next()) {
+        return result.getInt(1);
+      }
+
+      throw new OBException("Query result not found");
+    }
+  }
+
+  private String checkAvailabilityUsingOrgQuery() throws Exception {
+    // Do a quick database check to ensure it responds
+    Organization organization = OBDal.getInstance().get(Organization.class, "0");
+    return organization != null ? "OK" : "NOK";
+  }
 }
diff --git a/src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java b/src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java
--- a/src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java
+++ b/src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java
@@ -1,6 +1,6 @@
 /*
  ************************************************************************************
- * Copyright (C) 2015-2017 Openbravo S.L.U.
+ * Copyright (C) 2015-2019 Openbravo S.L.U.
  * Licensed under the Openbravo Commercial License version 1.0
  * You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
  * or in the legal folder of this module distribution.
@@ -8,20 +8,11 @@
  */
 package org.openbravo.mobile.core.servercontroller;
 
-import java.util.List;
-
 import org.apache.log4j.Logger;
-import org.codehaus.jettison.json.JSONException;
-import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.exception.OBException;
-import org.openbravo.base.weld.WeldUtils;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.mobile.core.MobileServerDefinition;
-import org.openbravo.mobile.core.authenticate.MobileAuthenticationKeyUtils;
-import org.openbravo.mobile.core.servercontroller.MobileServerController.TransitionToOfflineExternalHandler;
-import org.openbravo.mobile.core.servercontroller.log.ServerStatusLogger;
-import org.openbravo.mobile.core.servercontroller.log.ServerTransitionStatus;
 
 /**
  * This class implements the thread which checks if the main servers and the external servers are
@@ -40,12 +31,9 @@
 
   private static final Logger log = Logger.getLogger(MobileMainServerCheck.class);
   private static boolean threadIsRunning = false;
-  private static final int TEN_SECONDS = 10000;
   private static final int ONE_MINUTE = 60000;
   private static final int FIVE_MINUTES = 5 * ONE_MINUTE;
   private static final int TEN_MINUTES = 10 * ONE_MINUTE;
-  private static final int THIRTY_MINUTES = 30 * ONE_MINUTE;
-  private static final String SERVER_STATUS_PROPERTY_NAME = "serverStatus";
 
   public static boolean isThreadRunning() {
     return threadIsRunning;
@@ -56,9 +44,7 @@
   }
 
   private OBContext obContext;
-  private long startTime = System.currentTimeMillis();
   private long offlineWaitTime = -1;
-  private long intervalTime = 10000;
 
   public MobileMainServerCheck(OBContext context) {
     this.obContext = context;
@@ -69,17 +55,9 @@
           + ") has been set, ignoring it, using default of 5 mins");
       offlineWaitTime = FIVE_MINUTES;
     }
-
-    intervalTime = MobileServerUtils.getIntegerPreference("OBMOBC_RequestRouterPingTime",
-        ONE_MINUTE);
-    if (intervalTime < TEN_SECONDS || intervalTime > THIRTY_MINUTES) {
-      log.warn("The specified interval time is outside reasonable limits " + intervalTime
-          + " ignoring it and falling back to sensible default (1 minute)");
-      // check somewhat arbitrary numbers
-      intervalTime = ONE_MINUTE;
-    }
   }
 
+  @Override
   public void run() {
 
     // central server should always to be online, they don't transition between states
@@ -94,50 +72,32 @@
     }
     setThreadIsRunning(true);
     try {
-      log.debug("Started main and external server check");
       OBContext.setOBContext(obContext);
       OBContext.setAdminMode(false);
 
-      // the mobile servers will check of they can go online:
-      // - the central server will check the offline handlers
-      // - mobile servers will also check the status of the central server
+      // wait for the transition to offline wait time before going offline
+      try {
+        log.info("Waiting " + offlineWaitTime + " milliseconds before going offline");
+        Thread.sleep(offlineWaitTime);
+      } catch (InterruptedException ignore) {
+        log.error("MobileMainServerCheck interruption when sleeping", ignore);
+      }
+
+      // do one last check as this also checks stockmd
       MobileServerDefinition thisServerDef = MobileServerController.getInstance()
           .getThisServerDefinition();
-      // keep transitioning to offline until all offline checks are passed or until
-      // the process has been transitioning to offline longer than OBMOBC_TransitionToOfflineWait
-      // or if offline is not allowed anymore due to sync errors
-      boolean keepTransitioningToOffline = true;
-      while (keepTransitioningToOffline) {
-        boolean shouldGoOffline = executeOfflineChecks(thisServerDef);
-
-        // save any status updates
-        commitAndCloseTransactions();
-
-        if (shouldGoOffline) {
-          // if we have waited/tried for the offline wait time period then move ourselves
-          // to offline
-          if (transitionToOfflineIntervalHasPassed(thisServerDef)) {
-            goOffline();
-            // break out of the loop, there is a separate process request which will check if the
-            // server can go back online, so not needed to continue in this loop
-            keepTransitioningToOffline = false;
-          } else {
-            log.debug("Some offline checks have failed. Transition to offline will continue for "
-                + ((startTime + offlineWaitTime) - System.currentTimeMillis()) + " milliseconds");
-          }
-          if (keepTransitioningToOffline) {
-            waitBeforeNextAttempt();
-          }
-        } else {
-          log.info("Not going offline, go back online");
-          // all main and external servers are back online
-          goBackToOnline(thisServerDef);
-          keepTransitioningToOffline = false;
-        }
+      boolean shouldGoOffline = executeOfflineChecks(thisServerDef);
+      if (!shouldGoOffline) {
+        goBackToOnline(thisServerDef);
+      } else {
+        log.info("Going offline");
+        MobileServerController.getInstance().setMobileServerState(MobileServerState.OFFLINE);
       }
-      commitAndCloseTransactions();
+      OBDal.getInstance().commitAndClose();
+      OBDal.getReadOnlyInstance().commitAndClose();
     } catch (Throwable t) {
-      rollbackAndCloseTransactions();
+      OBDal.getInstance().rollbackAndClose();
+      OBDal.getReadOnlyInstance().rollbackAndClose();
       throw new OBException(t);
     } finally {
       OBContext.restorePreviousMode();
@@ -145,118 +105,24 @@
     }
   }
 
-  private void commitAndCloseTransactions() {
-    OBDal.getInstance().commitAndClose();
-    OBDal.getReadOnlyInstance().commitAndClose();
-  }
-
-  private void rollbackAndCloseTransactions() {
-    OBDal.getInstance().rollbackAndClose();
-    OBDal.getReadOnlyInstance().rollbackAndClose();
-  }
-
-  private void goOffline() {
-    log.info("Setting status to offline");
-    MobileServerController.getInstance().setMobileServerState(MobileServerState.OFFLINE);
-    ServerStatusLogger.getInstance().logTransition(ServerTransitionStatus.TRANSITION_OFFLINE,
-        MobileServerController.getInstance().getThisServerDefinition());
-    OBDal.getInstance().commitAndClose();
-  }
-  
   private void goBackToOnline(MobileServerDefinition thisServerDef) {
     // already online
     if (MobileServerState.ONLINE.getValue().equals(thisServerDef.getStatus())) {
-      log.debug("Server is back online already, returning");
+      log.info("Server is back online already, returning");
     } else {
       log.info("Going back online");
       MobileServerController.getInstance().setMobileServerState(MobileServerState.ONLINE);
-      OBDal.getInstance().commitAndClose();
     }
   }
 
-  private void waitBeforeNextAttempt() {
-    try {
-      log.info("Waiting " + intervalTime + " milliseconds before rechecking");
-      Thread.sleep(intervalTime);
-    } catch (InterruptedException e) {
-      log.error("MobileMainServerCheck interruption when sleeping", e);
-      Thread.currentThread().interrupt(); // Here!
-      throw new RuntimeException(e);
-    }
-  }
-
-  private boolean transitionToOfflineIntervalHasPassed(MobileServerDefinition thisServerDef) {
-    return System.currentTimeMillis() > (startTime + offlineWaitTime)
-        && !MobileServerState.OFFLINE.getValue().equals(thisServerDef.getStatus());
-  }
-
   private boolean executeOfflineChecks(MobileServerDefinition thisServerDef) throws Exception {
-
-    final List<TransitionToOfflineExternalHandler> ttoHandlers = WeldUtils
-        .getInstances(TransitionToOfflineExternalHandler.class);
-    for (TransitionToOfflineExternalHandler ttoHandler : ttoHandlers) {
-      if (!ttoHandler.allowTransitionToOffline()) {
-        log.info("In transition to offline, but is not allowed by "
-            + ttoHandler.getClass().getName());
-        return false;
-      }
-    }
-
-    boolean thereAreOfflineExternalServers = ServerStateBackground
-        .checkOfflineHandlers(thisServerDef);
-
-    boolean shouldGoOffline = thereAreOfflineExternalServers;
-
-    if (MobileServerController.getInstance().isThisAStoreServer()) {
-      boolean centralServerIsOffline = !pingCentralServerIsOnline();
-      shouldGoOffline |= centralServerIsOffline;
-    }
+    // this does also stockMD check
+    boolean shouldGoOffline = ServerStateBackground.checkOfflineHandlers(thisServerDef);
+    log.info("External server says should go offline result: " + shouldGoOffline);
+    shouldGoOffline |= !MobileServerRequestExecutor.getInstance()
+        .centralServerIsResponsive(MobileServerController.getInstance().getCentralServer());
+    log.info("Check result says should go offline result: " + shouldGoOffline);
     return shouldGoOffline;
   }
 
-  private boolean pingCentralServerIsOnline() throws Exception {
-    try {
-      OBContext.setOBContext(obContext);
-      OBContext.setAdminMode();
-      final JSONObject parameters = new JSONObject();
-      parameters.put("organization", "0");
-      parameters.put("client", "0");
-      parameters.put("mobileServerKey", MobileServerController.getInstance().getMobileServerKey());
-      final String queryParams = MobileServerUtils.getAuthenticationQueryParams(
-          MobileServerController.getInstance().getThisServerDefinition().getClient().getId(), "0",
-          "0", "100")
-          + "&" + MobileAuthenticationKeyUtils.USE_USER_CACHE_PARAMETER + "=true";
-      MobileServerDefinition centralServer = MobileServerController.getInstance()
-          .getCentralServer();
-      final JSONObject resp = new JSONObject(MobileServerRequestExecutor.getInstance().request(
-          centralServer,
-          MobileServerUtils.OBWSPATH + MobileServerStatusInformation.class.getName(), queryParams,
-          "POST", parameters)).getJSONObject("response");
-      final String newStatus = getStatusFromResponse(resp);
-      centralServer.setStatus(newStatus);
-      OBDal.getInstance().save(centralServer);
-      OBDal.getInstance().flush();
-      return MobileServerState.ONLINE.getValue().equals(newStatus);
-    } catch (Throwable t) {
-      // assume that any error means not available
-      return false;
-    } finally {
-      OBContext.restorePreviousMode();
-    }
-  }
-
-  private String getStatusFromResponse(JSONObject response) throws JSONException {
-    String newStatus = null;
-    if (response != null) {
-      if (response.has(SERVER_STATUS_PROPERTY_NAME)) {
-        newStatus = response.getString(SERVER_STATUS_PROPERTY_NAME);
-      } else {
-        newStatus = MobileServerState.ONLINE.getValue();
-      }
-    } else {
-      newStatus = MobileServerState.OFFLINE.getValue();
-    }
-    return newStatus;
-  }
-
-}
+}
\ No newline at end of file
diff --git a/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java b/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
--- a/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
+++ b/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
@@ -610,9 +610,7 @@
       return;
     }
 
-    final int waitTimeSeconds = MobileServerUtils.getIntegerPreference(
-        "OBMOBC_FailedTransitionToOnlineWaitTime", 3600);
-    transitionToOnlineWaitTimeStamp = waitTimeSeconds * 1000 + System.currentTimeMillis();
+    setTransitionToOnlineWaitTime();
 
     isTransitioningToOnline = true;
     TransitionToOnline toOnline = new TransitionToOnline();
@@ -624,6 +622,12 @@
     thrd.start();
   }
 
+  public void setTransitionToOnlineWaitTime() {
+    final int waitTimeSeconds = MobileServerUtils
+        .getIntegerPreference("OBMOBC_FailedTransitionToOnlineWaitTime", 3600);
+    transitionToOnlineWaitTimeStamp = waitTimeSeconds * 1000 + System.currentTimeMillis();
+  }
+
   public void forceTransitionToOnline() {
     log.info("Forcing a transition to online attempt");
     resetTransitionToOnlineWaitTimeStamp();
@@ -748,6 +752,14 @@
     }
 
     private boolean canTransitionToOnline() throws Exception {
+      if (!MobileServerRequestExecutor.getInstance()
+          .centralServerIsResponsive(getCentralServer())) {
+        ServerStatusLogger.getInstance().logTransition(
+            ServerTransitionStatus.FAILED_TRANSITION_ONLINE,
+            MobileServerController.getInstance().getThisServerDefinition(),
+            "Cannot transition to online, central server is not responsive");
+        return false;
+      }
       return tryTransitionToOnline(true);
     }
 
diff --git a/src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java b/src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
--- a/src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
+++ b/src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
@@ -1,6 +1,6 @@
 /*
  ************************************************************************************
- * Copyright (C) 2015-2018 Openbravo S.L.U.
+ * Copyright (C) 2015-2019 Openbravo S.L.U.
  * Licensed under the Openbravo Commercial License version 1.0
  * You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
  * or in the legal folder of this module distribution.
@@ -30,6 +30,7 @@
 import org.openbravo.dal.service.OBQuery;
 import org.openbravo.erpCommon.utility.OBMessageUtils;
 import org.openbravo.mobile.core.MobileServerDefinition;
+import org.openbravo.mobile.core.MobileServerOrganization;
 import org.openbravo.mobile.core.MobileServerService;
 import org.openbravo.mobile.core.authenticate.MobileAuthenticationKeyUtils;
 import org.openbravo.model.common.enterprise.Organization;
@@ -48,6 +49,7 @@
   public static final String SOURCE_CENTRAL = "CENTRAL";
   public static final String SOURCE_WEBPOS = "WEBPOS";
 
+  @Deprecated
   public static final int RESPONSIVENESS_CHECK_READ_TIMEOUT = 30000;
 
   private final static Logger log = Logger.getLogger(MobileServerRequestExecutor.class);
@@ -62,7 +64,6 @@
     MobileServerRequestExecutor.instance = instance;
   }
 
-  private Integer maxRetries = null;
   private Integer connectionTimeout = null;
   private Integer readTimeout = null;
 
@@ -248,7 +249,8 @@
       JSONObject parameters) {
     int tries = 0;
     JSONObject resp = new JSONObject();
-    while (tries <= getMaxRetries()) {
+    int maxRetries = getMaxRetries();
+    while (tries <= maxRetries) {
       try {
         if (tries > 0) {
           // when retrying then
@@ -289,25 +291,26 @@
     return resp;
   }
 
-  private boolean centralServerIsResponsive(MobileServerDefinition server) {
+  public boolean centralServerIsResponsive(MobileServerDefinition server) {
     boolean isAvailable = false;
     int tries = 0;
-    while (!isAvailable && tries < getMaxRetries()) {
+    int maxRetries = Math.max(1, getMaxRetries());
+    while (!isAvailable && tries <= maxRetries) {
       try {
         if (tries > 0) {
           Thread.sleep(50);
         }
         MobileServerDefinition thisServerDefinition = MobileServerController.getInstance()
             .getThisServerDefinition();
+        String storeOrgId = getStoreOrgId();
         final String queryParams = MobileServerUtils.getAuthenticationQueryParams(
-            thisServerDefinition.getClient().getId(), "0", "0", "100")
-            + "&"
+            thisServerDefinition.getClient().getId(), storeOrgId, "0", "100") + "&"
             + MobileAuthenticationKeyUtils.USE_USER_CACHE_PARAMETER + "=true";
         final JSONObject parameters = new JSONObject();
 
         JSONObject resp = new JSONObject(MobileServerRequestExecutor.getInstance().request(server,
             MobileServerUtils.OBWSPATH + CheckServerAvailability.class.getName(), queryParams,
-            "POST", parameters, RESPONSIVENESS_CHECK_READ_TIMEOUT)).getJSONObject("response");
+            "POST", parameters, 5000)).getJSONObject("response");
         isAvailable = resp.has("serverStatus") && "OK".equals(resp.getString("serverStatus"));
       } catch (Throwable e) {
         // keep trying until it runs out of retries
@@ -317,7 +320,17 @@
       }
     }
     return isAvailable;
+  }
 
+  private String getStoreOrgId() {
+    MobileServerDefinition thisServerDefinition = MobileServerController.getInstance()
+        .getThisServerDefinition();
+    List<MobileServerOrganization> organizations = thisServerDefinition.getOBMOBCSERVERORGSList();
+    if (organizations.isEmpty()) {
+      return "0";
+    } else {
+      return organizations.get(0).getServerOrg().getId();
+    }
   }
 
   private Integer getConnectionTimeout() {
@@ -330,20 +343,19 @@
 
   private Integer getReadTimeout() {
     if (readTimeout == null) {
-      readTimeout = MobileServerUtils.getIntegerPreference("OBMOBC_READ_TIMEOUT_REQUEST", 15) * 60 * 1000;
+      readTimeout = MobileServerUtils.getIntegerPreference("OBMOBC_READ_TIMEOUT_REQUEST", 90)
+          * 1000;
+      if (readTimeout < 60000) {
+        log.error("Read timeout preference is set too low (<60) " + readTimeout
+            + " correcting to 90 seconds.");
+        readTimeout = 90000;
+      }
     }
     return readTimeout;
   }
 
   private Integer getMaxRetries() {
-    if (maxRetries == null) {
-      maxRetries = MobileServerUtils.getIntegerPreference("OBMOBC_NumberOfRequestRetries", 3);
-      if (maxRetries == 0) {
-        log.error("Preference OBMOBC_NumberOfRequestRetries is set to zero, this is incorrect, using value 1 as minimum value now.");
-        maxRetries = 1;
-      }
-    }
-    return maxRetries;
+    return MobileServerUtils.getIntegerPreference("OBMOBC_NumberOfRequestRetries_SS", 0);
   }
 
   /**
