Hi Tim,
Yeah, I was wondering about that error code too. It hadn't occurred to me
the problem could be the transit lag between the client the server but that
would account for what I'm seeing. Interesting idea about the wrapper.
Maybe I'll make a specific error handling method for these sorts of
functions...

BTW this is v15.4. The clients seems to be most windows machines.

Thanks for the insight.

On Mon, Feb 20, 2017 at 12:57 PM, Tim Nevels via 4D_Tech <
[email protected]> wrote:

>
> The Error Stack caught my eye. To me it indicates 4D Server, for whatever
> reason, did not respond in an expected way. Maybe it was not quick enough.
> Maybe 4D Server and the SQL Server was a bit busy at that exact point in
> time and thus returned error 1009 which then cascaded to error 1002.
>
> You said this code is called many hundreds of times each day, yet
> occasionally if fails. So the program code is good and passing it bad data
> in $partner_id should not cause an error like this.
>
> I would suggest you write a wrapper method for this code and check for the
> 1002 or 1009 error code returned. If you get that, just wait a bit and try
> again. Maybe try 3 times before you give up.
>
> Maybe do a PAUSE PROCESS(Current process;10) to wait 1/10 of a second,
> then run the code again and if there is still an error, repeat. Keep an
> error count so when you reach your limit of 3 attempts, then you record the
> error to your error logging and to the user.
>
> I would also record a special info type message every time you run into
> this situation where you have to try more than once and record success or
> failure and the number of attempts. Then you’ll be able to track how often
> this fix/hack is working and being successful. You might find you need to
> try 5 times before it is always successful.
>
> I had to implement a similar fix/hack for a situation where I was checking
> if a shared folder was mounted using the “Test path name” command.
> Sometimes it would report the share was not available, but it really was.
> If you did the same operation a second time it worked. By simply checking
> several times in a row if the first Test path name failed solved the
> problem and eliminated the user seeing any error message.
>
> For anyone interested, this error can occur when you are using macOS 10.7
> to share a directory with a Windows user via SMB. Apple threw out SAMBA as
> their Windows SMB code base and wrote their own from scratch with 10.7.
> Whatever they did caused this issue for me. Might have been fixed in later
> macOS versions.
>
> Tim
>
> ********************************************
> Tim Nevels
> Innovative Solutions
> 785-749-3444
> [email protected]
> ********************************************
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************




-- 
Kirk Brooks
San Francisco, CA
=======================
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to