openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikael Kurula <alcar...@gmail.com>
Subject MySQL timeouts?
Date Wed, 12 Dec 2012 23:35:36 GMT
Dear All,

As an ordinary user of OpenMeetings, I'm using OpenJPA for persistence. I
have an issue with MySQL timing out. I posted a bug report in the
OpenMeetings JIRA, but I was directed to OpenJPA instead. I sometimes get
messages of the following type in my OpenMeetings log, mainly in the
morning when nobody has used the server overnight; notice the extremely
long time since the last successful transmission:

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The
last packet successfully received from the server was 90,881,924
milliseconds ago. The last packet sent successfully to the server was
90,881,924 milliseconds ago. is longer than the server configured value of
'wait_timeout'. You should consider either expiring and/or testing
connection validity before use in your application, increasing the server
configured values for client timeouts, or using the Connector/J connection
property 'autoReconnect=true' to avoid this problem.

>From what I understood, autoReconnect=true is already in use. Has anyone
here seen anything like this?

My version of openmeetings is this:
apache-openmeetings-incubating-2.0.0.r1361497-14-07-2012_1108.tar.gz

... and the version of the J connector is
mysql-connector-java-5.1.22.tar.gz.

I don't know how to check which version of OpenJPA I'm using, but my
persistence.xml is attached below.

Thanks a lot for any help,
Mikael

--- 8< ---

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.

-->
<!-- persistence.xml schema -->
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0">
 <persistence-unit name="openmeetings" transaction-type="RESOURCE_LOCAL">

<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
 <class>org.openmeetings.app.persistence.beans.adresses.Adresses</class>
<class>org.openmeetings.app.persistence.beans.adresses.States</class>
 <class>org.openmeetings.app.persistence.beans.basic.Configuration</class>
<class>org.openmeetings.app.persistence.beans.basic.ErrorType</class>
 <class>org.openmeetings.app.persistence.beans.basic.ErrorValues</class>
<class>org.openmeetings.app.persistence.beans.basic.LdapConfig</class>
 <class>org.openmeetings.app.persistence.beans.basic.Naviglobal</class>
<class>org.openmeetings.app.persistence.beans.basic.Navimain</class>
 <class>org.openmeetings.app.persistence.beans.basic.OmTimeZone</class>
<class>org.openmeetings.app.persistence.beans.basic.Sessiondata</class>
 <class>org.openmeetings.app.persistence.beans.basic.SOAPLogin</class>
<class>org.openmeetings.app.persistence.beans.calendar.Appointment</class>

<class>org.openmeetings.app.persistence.beans.calendar.AppointmentCategory</class>
<class>org.openmeetings.app.persistence.beans.calendar.AppointmentReminderTyps</class>

<class>org.openmeetings.app.persistence.beans.calendar.MeetingMember</class>
<class>org.openmeetings.app.persistence.beans.domain.Organisation</class>

<class>org.openmeetings.app.persistence.beans.domain.Organisation_Users</class>
<class>org.openmeetings.app.persistence.beans.flvrecord.FlvRecording</class>

<class>org.openmeetings.app.persistence.beans.flvrecord.FlvRecordingLog</class>
<class>org.openmeetings.app.persistence.beans.flvrecord.FlvRecordingMetaData</class>

<class>org.openmeetings.app.persistence.beans.flvrecord.FlvRecordingMetaDelta</class>
<class>org.openmeetings.app.persistence.beans.invitation.Invitations</class>
 <class>org.openmeetings.app.persistence.beans.lang.FieldLanguage</class>
<class>org.openmeetings.app.persistence.beans.lang.Fieldlanguagesvalues</class>
 <class>org.openmeetings.app.persistence.beans.lang.Fieldvalues</class>
<class>org.openmeetings.app.persistence.beans.logs.ConferenceLog</class>

<class>org.openmeetings.app.persistence.beans.logs.ConferenceLogType</class>
<class>org.openmeetings.app.persistence.beans.poll.PollType</class>
 <class>org.openmeetings.app.persistence.beans.poll.RoomPoll</class>
<class>org.openmeetings.app.persistence.beans.poll.RoomPollAnswers</class>
 <class>org.openmeetings.app.persistence.beans.rooms.RoomModerators</class>
<class>org.openmeetings.app.persistence.beans.rooms.Rooms</class>
 <class>org.openmeetings.app.persistence.beans.rooms.RoomTypes</class>
<class>org.openmeetings.app.persistence.beans.rooms.Rooms_Organisation</class>

<class>org.openmeetings.app.persistence.beans.sip.OpenXGReturnObject</class>
<class>org.openmeetings.app.persistence.beans.user.PrivateMessages</class>

<class>org.openmeetings.app.persistence.beans.user.PrivateMessageFolder</class>
<class>org.openmeetings.app.persistence.beans.user.Salutations</class>
 <class>org.openmeetings.app.persistence.beans.user.UserContacts</class>
<class>org.openmeetings.app.persistence.beans.user.Userdata</class>
 <class>org.openmeetings.app.persistence.beans.user.Userlevel</class>
<class>org.openmeetings.app.persistence.beans.user.UserSipData</class>
 <class>org.openmeetings.app.persistence.beans.user.Users</class>
<class>org.openmeetings.app.persistence.beans.files.FileExplorerItem</class>

<class>org.openmeetings.app.persistence.beans.sip.asterisk.AsteriskSipUsers</class>

<class>org.openmeetings.app.persistence.beans.sip.asterisk.Extensions</class>

<class>org.openmeetings.app.persistence.beans.sip.asterisk.MeetMe</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
 <properties>
    <property name="openjpa.RuntimeUnenhancedClasses" value="unsupported"/>
            <property name="openjpa.ConnectionDriverName"
value="org.apache.commons.dbcp.BasicDataSource" />
<property name="openjpa.ConnectionProperties"
 value="DriverClassName=com.mysql.jdbc.Driver
,
Url=jdbc:mysql://localhost:3306/openmeetings?autoReconnect=true&amp;useUnicode=true&amp;createDatabaseIfNotExist=true&amp;characterEncoding=utf-8&amp;connectionCollation=utf8_general_ci&amp;cachePrepStmts=true&amp;cacheCallableStatements=true&amp;cacheServerConfiguration=true&amp;useLocalSessionState=true&amp;elideSetAutoCommits=true&amp;alwaysSendSetIsolation=false&amp;enableQueryTimeouts=false&amp;prepStmtCacheSize=3000&amp;prepStmtCacheSqlLimit=1000
 , MaxActive=100
, MaxWait=10000
, TestOnBorrow=true
 , poolPreparedStatements=true
, Username=openmeetings
, Password=XXX"/>
 <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema"/>
<property name="openjpa.Log" value="DefaultLevel=WARN, Tool=INFO" />
 <property name="openjpa.DataCache" value="true"/>
<!-- QueryCache disabled due to changes outside of JPA doesn't take effect
with caching -->
 <property name="openjpa.QueryCache" value="false"/>
<property name="openjpa.jdbc.DBDictionary"
 value="batchLimit=100,tableType=myisam"/>
 <property name="openjpa.jdbc.QuerySQLCache"  value="false"/>
</properties>
 </persistence-unit>
</persistence>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message