High Utilization on Mobility Python Process

  • 7003719
  • 10-Apr-2012
  • 27-Jan-2014

Environment

Novell Data Synchronizer Mobility Pack

Situation

High Utilization on Mobility Python Process
Mobility Python Process starts up fine and after few hours the CPU Utilization for Mobility  goes above 100% and stays above 100%
/var/log/datasync/connectors/default.pipeline1.mobility-AppInterface.log does not show any errors

Resolution

There could be many reasons for High Utilization on Mobility Python Process. Follow the steps listed below to see if it helps.
 
The following steps talk about one specific reason where the Mobility Connectors keep on querying the same deviceId over and over again causing high utilization.
  1. Browse to /var/lib/pgsql/data/.
  2. Edit postgresql.conf file.
  3. Change "log_min_duration_statement = -1" to "log_min_duration_statement = 0".
  4. Save the file.
  5. Type "rcdatasync stop" and press Enter.
  6. Type "rcpostgresql restart" and press Enter.
  7. Type "rcdatasync start" and press Enter.
  8. Wait for the problem to happen and then check the log files in /var/lib/pgsql/data/pg_log/.
  9. Check for something like the following.
    2012-04-05 18:22:53 PDT mobility datasync_user LOG:  duration: 0.288 ms  statement: SELECT * FROM FolderMaps WHERE deviceId = E'f506141161aa11e18ff33c4a92e84b00' AND folderId = E'20120227172600-750215'
    2012-04-05 18:22:53 PDT mobility datasync_user LOG:  duration: 0.318 ms  statement: SELECT * FROM FolderMaps WHERE deviceId = E'f506141161aa11e18ff33c4a92e84b00' AND folderId = E'20120227172544-341801'
    Note: The deviceId is repeated over and over again for different folderIDs. In this case the Mobility Python Process keeps on quering the FolderMaps table with this DeviceID for different folders over and over again (at least twice every second)
  10. Note down the deviceID. In the example above it is "f506141161aa11e18ff33c4a92e84b00".
  11. Type psql -U datasync_user mobility and press Enter.
  12. Enter in the database password. If the database password is not known, please check /etc/datasync/configengine/configengine.xml file as the password is stored in plaintext in the following format
          <db>datasync</db>
          <username>datasync_user</username>
          <password>novell</password>
  13. Once in the database, please type select userid from devices where deviceid = 'f506141161aa11e18ff33c4a92e84b00';
    Note: Make sure to replace the deviceid string with the one you have identified and put a ; at the end of the command.
  14. The output should be similar to the following
            userid
    ----------------------
     cn=user25,ou=gw,o=my
    (1 row)
  15. Note down the user and type \q to exit the database.
  16. Remove the user shown from both the connectors (groupwise and mobility).
  17. Restart DataSync to make sure that the problem does not happen again.
  18. Run GWCheck with Contents/Fix on the user account and add the user again to both the connectors

Status

Reported to Engineering

Additional Information

There were also a lot of I utilization fixed in Mobility 2.0. The following is a link to The Mobility 2.0 code:

https://download.novell.com/Download?buildid=xWnnbrV7Xic~