Clearing the cakephp tmp/cache solves the issue for only one save call. What can be the reason?

StackOverflow https://stackoverflow.com/questions/18029408

  •  23-06-2022
  •  | 
  •  

문제

I modified the schema of mysql database(added a new table etc.), I cleared the tmp/cache(except directories). Now the save in the new table happens only once(I have multiple save calls in a for loop and save happens for all of them) and fails from next time I enter the flow.

I am using cakephp 1.3.

What else should I check ?

도움이 되었습니까?

해결책

Got it.

The cache issue was one part of the problem, which got fixed by clearing the files in tmp/cache directory.

Learning is - If you make mysql schema changes(add new table / column etc.) in mysql, either clear the tmp/cache directory or set the debug level as 3 and refresh the page and set the debug level again to 0(if on production).

I was also getting a save error - mysql server has gone away, because in configs the wait_timeout value was 600 seconds. But my script was taking longer than that. So model->save() was not working.

In my.cnf I updated the timeout to 4800 and restarted mysql and it fixed the problem.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top