7 Replies Latest reply on May 12, 2016 2:08 PM by mrwatson-gbs

    PSOS error 513

    psurget

      HI everyone, excuse my english in advance. I have a script executed with the perform on server step. It had works all the day and for no matter what, now it give me an error 513. I take a look on the description and it talks about a validation error. I placed a commit before the psos step but nothing's changed. I really don't understand the description of the error. Maybe it's another esoteric description from Filemaker?

       

      Thanks for your answers.

        • 1. Re: PSOS error 513
          coherentkris

          It seems like their is a script step to create a new record and the table definition needs a value that is not available to the server session.

          Make sure all the script steps are server compatible.

          Make sure that you re not setting regular fields with global variables or global fields as they do not retain their values for PSOS or server side scripts.

          • 2. Re: PSOS error 513
            psurget

            I run the script debugger and the error happens not into the server script but when it hits the perform script on server step. I try to pass a parameter and this parameter is a Base64 text. And like I said, this script has run many times in the day with no changes modifications. I'm really confuse.

            • 3. Re: PSOS error 513
              TorstenBernhard

              Under some circumstances, server scripts yield different results compared to a run in the client. The cause may be that a data is not available in the server context.

              Server-side execution of a script cannot be tracked in the debugger. A workaround is to create a table were the script logs the values it receives and computes (1 record for each run). This allows for a post- run analysis and may give you a hint of what  goes wrong.

              • 4. Re: PSOS error 513
                coherentkris

                Post a screenshot of the script and the script that is run by PSOS indicate exactly where you are getting the error

                • 5. Re: PSOS error 513
                  bruderdog

                  Is your Script Parameter > 1,000,000 characters? This is the limit for PSOS parameters and PSOS Script Results.

                   

                  If your parameter is bigger, break the B64 text into smaller chunks (≤ 1000000 chars) and send it in segments to the Server. Once the server has all the segments, concatenate them on the server and process the data as needed.

                   

                  Similarly, if you have to return a large Script Result, send it back to the client in segments of < 1,000,000 chars.

                   

                  I ran a simple test and sending/returning a 1000000 char param/result worked fine but a 1000010 result/param caused Error 513.

                  • 6. Re: PSOS error 513
                    psurget

                    A big thanks everyone.

                    • 7. Re: PSOS error 513
                      mrwatson-gbs

                      Alternatively, create a record in a session table,

                       

                      Place the script name and parameter in the record.

                       

                      Call a central handler script with PSoS and pass the id of the record.

                       

                      On the server your handler script can find the session record and read a parameter of any size.

                       

                      It can also write a result --- and a debugging log!!! ---  back into the record on return.

                       

                      This avoids the parameter limit and centralises lots of house keeping code.