Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
      <plugin>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven2-plugin</artifactId>
        <inherited>true</inherited>
        <configuration>
          <container>
            <timeout>180000</timeout>

Synchronization Task Execution

...

report

...

not generated

...

when

...

large number of users

...

(e.g. 1000+)

...

exist in MySQL

We can track the cause if we see errors in the core.log as follows:

Code Block
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Data truncation: Data too long for column 'message' at row 1 {prepstmnt 1398507577 INSERT INTO TaskExec (id, endDate, message, startDate, status, TASK_ID) VALUES (?, ?, ?, ?, ?, ?)} [code=1406, state=22001]

The root cause of such trouble is the JPA annotation @Lob (without any modifier) which becomes "TEXT" column type in MySQL.

However, MySQL features some more textual type variants, so if change when changing the message column definition in the TaskExec table message filed via SQL from TEXT to MEDIUMTEXT or LONGTEXT and then restart Syncope, permitting OpenJPA to update get the change, you will overcome this limitation issue.

For example:

Code Block
mysql> describe TaskExec;
+-----------+--------------+------+-----+---------+-------+
| Field     | Type         | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+-------+
| id        | bigint(20)   | NO   | PRI | NULL    |       |
| endDate   | datetime     | YES  |     | NULL    |       |
| message   | text         | YES  |     | NULL    |       |
| startDate | datetime     | YES  |     | NULL    |       |
| status    | varchar(255) | NO   |     | NULL    |       |
| TASK_ID   | bigint(20)   | YES  | MUL | NULL    |       |
+-----------+--------------+------+-----+---------+-------+
6 rows in set (0.00 sec)

The following mysql ALTER command changes the "text" TEXT type value above to "mediumtext" MEDIUMTEXT type.

Code Block
mysql> ALTER TABLE TaskExec MODIFY message mediumtext;
Query OK, 99 rows affected (0.45 sec)
Records: 99  Duplicates: 0  Warnings: 0
MEDIUMTEXT;
Code Block
mysql> describe TaskExec;
+-----------+--------------+------+-----+---------+-------+
| Field     | Type         | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+-------+
| id        | bigint(20)   | NO   | PRI | NULL    |       |
| endDate   | datetime     | YES  |     | NULL    |       |
| message   | mediumtext   | YES  |     | NULL    |       |
| startDate | datetime     | YES  |     | NULL    |       |
| status    | varchar(255) | NO   |     | NULL    |       |
| TASK_ID   | bigint(20)   | YES  | MUL | NULL    |       |
+-----------+--------------+------+-----+---------+-------+
6 rows in set (0.00 sec)

mysql>