Hi,
I can't see the image you uploaded to your last post.
When uploading that many assets, you have to be aware of the processes going on in the background, For every PDF you are uploading, an instance of the DAM Update Asset workflow is kicked off. If you upload all your assets at once, then obviously this will create a lot of workflows. If you were to try and update a PDF that was still being processed by a workflow, then you could end up with the error you saw. Ideally you should wait till the workflow has processed the asset before attempting to modify it, which is obviously hard to determine with so many assets/workflows.
I would try uploading say 10 PDF's, wait for the workflows to complete, check "/workflow/content/console.html", then run your script and see if all the files get updated.
Link[1] gives some information on how to upload a large number of assets, you can use import throttling to upload in batches.Link[2] outlines various performance issues with the DAM and how they affect the system as a whole.
Another option is to disable the DAM Update Asset workflow for the initial import, then enable it and use a script to go through the uploaded files to kick off the workflow. But review the links below and come back with any questions you may have.
Regards,
Opkar
[1] https://docs.adobe.com/docs/en/cq/5-6-1/deploying/scaling.html
[2] http://docs.adobe.com/docs/en/aem/6-1/deploy/configuring/performance/assets-performance-sizing.html