sassoftware / saspy

A Python interface module to the SAS System. It works with Linux, Windows, and Mainframe SAS as well as with SAS in Viya.
https://sassoftware.github.io/saspy
Other
373 stars 150 forks source link

Slow Performance with Submit() method #452

Closed nickcalenti closed 2 years ago

nickcalenti commented 2 years ago

I am currently split testing the same code set in the following scenarios:

  1. Submitted to sas server via enterprise guide
  2. Submitted to sas server via submit() method with saspy. I connect to the server using winiomwin

I am experiencing that on EG, the code takes about 1 hour to run. Via saspy its taking multiple hours, or more.

I am wondering if anyone has insights on why this may be happening. Thanks!

tomweber-sas commented 2 years ago

Hey @nickcalenti, I can help with that. I'm going to guess you're using the COM access method instead of IOM? https://sassoftware.github.io/saspy/configuration.html#choosing-an-access-method https://sassoftware.github.io/saspy/configuration.html#iom-using-com If so, using IOM is the supported, and performant Access Method to use. If you can show me your config, I'll be able to tell, FWIW.

Thanks, Tom

nickcalenti commented 2 years ago

Hey thanks @tomweber-sas: This is what i am using in my config file, which i think would be IOM:

winiomwin = {'java' : 'C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe', 'iomhost' : 'hidden', 'iomport' : 8591, 'omruser' : keyring.get_password('saspy','uName'), 'omrpw' : keyring.get_password('saspy','pass') }

tomweber-sas commented 2 years ago

Ah, that is IOM, so that's good. So, what's the code you're submitting? And can I see the SASLOG from what you ran?

nickcalenti commented 2 years ago

I know this isn't terribly helpful, but om not sure how much of our codebase I can share out publicly. Im wondering if this is some sort of timeout issue with the SASPY connection. I am running the same code also on 2 different data sets.
The "10 min" data set runs for approximately 10 mins in both the EG and saspy deployments.

The "hour long" data set has now been going for 3 hours on saspy with no response. This is making me think that something is breaking the connection. Not really sure how i could check that, as my python console still is acting as if its running the code.

tomweber-sas commented 2 years ago

Sure, no problem with not posting things here. You can always email me things like that if need be. Also, if you want, I can set up a Teams meeting to look at what you're seeing and just get my eyes on it to help see if there is something like that goin on too. Would that work for you?

nickcalenti commented 2 years ago

Ya, it certainly seems like it is timing out. I let it run all night with no response back to python. I would be great to setup a Teams meeting to go over it!

tomweber-sas commented 2 years ago

Hey @nickcalenti sorry I hadn't gotten back today, been swamped. I can set somethin gup for next week. Let me know what day/time is good for you and I'll get it set up. Oh, maybe email me; I think I need your email to send you the invite.

Thanks! Tom

tomweber-sas commented 2 years ago

After having the teams chat and some email back and forth, I still don't know what's going on with this. But I don't know what code was being executed, so there could be something causing this from that side (speculation). What was also noticed was that the code did seem to run; there was a database interaction which did happen, it's just saspy seemed to be hung, not getting back a response from SAS. So, the last thought was the following; just getting the thread back here on this issue to tie things back together:

from email: You know, I think what we need are the workspace server and stored process server logs for these attempts and then we can see what is going on. Do you have access to the server side, or do you have SAS admins/IT that can get these logs? The workspace server log is the SASLOG that we aren’t getting back to python. And the stored processes server logs will show when the workspace server starts up, and if/when it terminates and/or other odd things if so.

If we could get your run that works and the one that doesn’t, to compare against, maybe we’ll see what’s going on.

tomweber-sas commented 2 years ago

checking back in. Were you able to get any of the logs from server side, or figure out anything else about what's happening?

tomweber-sas commented 2 years ago

Hey, this one is pretty old and I don't have the info from the server side to know what's going on. Looking to clean up old issues, so is this still an issue, and if so, can we get object spawner logs and workspace server logs from a failure case to look at? Might need tech supports help on that side if that's not something you can easily get. Else if it's resolved itself or not an issue any more, can we close this? Thanks, Tom

tomweber-sas commented 2 years ago

Closing this one, as we don't have any more info to look at. If you want to continue, just reopen and let me know. Thanks, Tom