Issues with PMAX Placement Script

Hello, we ran the script twice - first with the default Max Rows setting, and then with an updated version where we increased it. In both cases, the script either stopped due to a timeout or failed due to system errors.

It may be that the account is too large to process all the data at once. Could we filter the data to reduce the load? Or is there another potential issue we might be missing?

Thanks in advance