You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/05/31 09:58:45 UTC

[GitHub] [shardingsphere] VeejaLiu opened a new issue, #18100: error by max_allowed_packet

VeejaLiu opened a new issue, #18100:
URL: https://github.com/apache/shardingsphere/issues/18100

   # Proxy 5.1.1
   
   I have a long sql(>4M)
   ```
   insert into XXX values (....)
   ```
   When I directly import this SQL into the database, there is no problem.
   
   But when i use proxy, it show:
   ```
   (py3) ubuntu@ip-xx-xx-xx-xx:~$ mysql -h127.0.0.1 -P3307 -uroot -proot xxxx < xxxx.sql
   ERROR at line 1: Packet for query is too large (4316145 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.
   ```
   And I view my variable in proxy:
   ```
   MySQL [xxxx]> show variables like 'max_allowed_packet';
   +--------------------+----------+
   | Variable_name      | Value    |
   +--------------------+----------+
   | max_allowed_packet | 4194304 |
   +--------------------+----------+
   1 row in set (0.005 sec)
   ```
   Well, It is not enough.
   Then I modify my resource config by:
   ```
   ALTER RESOURCE database_team_default(
       URL="jdbc:mysql://xxxx",
       USER=root,
       PASSWORD="xxxx",
       PROPERTIES("maximumPoolSize"=10,"idleTimeout"="30000","maxAllowedPacket"="16777216")
   );
   ```
   then view variable in proxy again:
   ```
   MySQL [xxxx]> show variables like 'max_allowed_packet';
   +--------------------+----------+
   | Variable_name      | Value    |
   +--------------------+----------+
   | max_allowed_packet | 16777216 |
   +--------------------+----------+
   1 row in set (0.005 sec)
   ```
   I think it's good now.
   
   But when i import data into proxy, the error still occurred.
   ```
   (py3) ubuntu@ip-xx-xx-xx-xx:~$ mysql -h127.0.0.1 -P3307 -uroot -proot xxx < EMAIL_THREAD.sql
   ERROR at line 1: Packet for query is too large (4316145 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] VeejaLiu closed issue #18100: error by max_allowed_packet

Posted by GitBox <gi...@apache.org>.
VeejaLiu closed issue #18100: error by max_allowed_packet
URL: https://github.com/apache/shardingsphere/issues/18100


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] VeejaLiu commented on issue #18100: error by max_allowed_packet

Posted by GitBox <gi...@apache.org>.
VeejaLiu commented on issue #18100:
URL: https://github.com/apache/shardingsphere/issues/18100#issuecomment-1141949259

   I restarted the proxy and solved this problem. 
   
   Now I just want to say a four letter word.
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   Good....


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] VeejaLiu commented on issue #18100: error by max_allowed_packet

Posted by GitBox <gi...@apache.org>.
VeejaLiu commented on issue #18100:
URL: https://github.com/apache/shardingsphere/issues/18100#issuecomment-1141950835

   So this also shows that it is useful to modify the resource attribute if there are related problems.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org