Home > Article > CMS Tutorial > Reasons and solutions for phpcms v9 update column cache failure
Problem and reason:
Recently I was doing maintenance on a previous project, and did some secondary development of phpcms, and wrote this The script to generate columns independently resulted in a large number of columns being added after running for a period of time. Yesterday I added a few more columns, but suddenly I found that I couldn't update the cache.
When updating, only two lines of prompts are displayed. I went to update the column cache again. Oops, all the data came out. I scrolled to the bottom of the displayed SQL statement and saw - "MySQL server has gone away
". It turned out that the cache was full.
Solution:
You need to configure the max_allowed_packet
value in the my.ini
file of mysql.
1. Check if there is max_allowed_packet
attribute in my.ini. If not, add it;
2. Modify the attribute default value 1M to 16M;
3. Add a "max_allowed_packet=16M
" at the end of the file;
4. Restart the server.
Recommended tutorial: phpcms tutorial
The above is the detailed content of Reasons and solutions for phpcms v9 update column cache failure. For more information, please follow other related articles on the PHP Chinese website!