The randomness is what gets me on this.
I suspect there might be some timing out issues between the application side and the server side.
I am solely basing this on:
1) It occurs randomly, which means it is also successful sometimes, which means the code is not necessarily broken.
2) The error referencing Modification ID, something that is seemingly transactional based.
3) I've had issues with CWP sometimes where timeouts are not handled gracefully by the server, causing mystery errors (usually returned by PHP for me).
To your point though, I've never to my recollection had an error 306 returned to me. I would suggest placing a "new issue" topic in the PyFilemaker code repository to see if anyone using/monitoring that has run into something similar. Else, if you contact filemaker tech support, they might have more info on what causes an error 306 to be returned.
Wouldn't it be nice if someone created a list of error messages AND an explanation that would make sense in "mom-speak"?
mom-speak: an understandable string of words that actually explains something without leaving out any "too obvious to mention" items and that is acronym free. I did some FMP trading books for a group of commodities traders once and the biggest obstacle in the entire process was their inability to explain what they did.
“English doesn't borrow from other languages. English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.” ― James Nicoll
Actually, every other programming language I've dealt with has thorough documentation on the specifics of why an error code is being thrown.
With error checking being around forever in filemaker, this has been seriously lacking. It's frustrating that we should have to rely on third parties (IE http://www.briandunning.com/error-codes/?source=FileMaker ) sites for relative information on error codes.
I suggested filemaker tech support, which a lot of people don't even know exists, to see if they've got internal info they can expose to us on this error.