How can I free up the memory used by update_post_meta?
It turns out that it was due to Query Monitor, a plugin that records info about each query. Every time update_post_meta ran, Query Monitor would store some data about the query, which eventually added up to be more than the server could handle. Running my example code on a default theme like Twenty Nineteen with … Read more