Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODBCLoader() : ERROR 3399: Failure in UDx RPC call InvokeSetupUDL(): timed out in receiving a UDx message #35

Open
afsungur opened this issue Feb 16, 2014 · 8 comments

Comments

@afsungur
Copy link

I am trying to use ODBCLoader() ( User Defined Loader ) in the Vertica Extension Package, but I am getting a timeout error. I am gonna explain it in below.

I can run queries which takes more than 60 seconds, in isql, like that:

image

I can also execute queries which takes more than 60 seconds in the python by using pyodbc.

When I try to run similar queries in the vsql by using ODBCLoader() I am getting timeout error as shown in the below. Firstly, I thought that it is similar to mysql connection, query timout problem but it is not related to the data source. Because remote odbc data source mysql and vertica gives same error. Just after 60 seconds passed, it throws an exception as shown in the below.

image

I edited the ODBCLoader.cpp code and set the SQL_ATTR_QUERY_TIMEOUT more than 60 seconds but it does not effect. What can be the problem? In the Cpp code is there any parameter which overrides the default query timeout?

My ODBC configuration is in below:

image

@aseering
Copy link
Contributor

The underlying issue here is that UDx calls can't block indefinitely. Most likely SQLExecDirect() is taking a very long time to return, and the function call is timing out.

Unfortunately, there is currently no way for setup() to indicate that it wants to keep taking time. So the solution to this would be to move that bit of code into process(); then modify it to use asynchronous ODBC calls and to have process() periodically return KEEP_GOING. This will, of course, only work properly for drivers that handle asynchronous calls correctly. (Also drivers whose thread-safety is implemented a little more tightly -- process() sees more concurrency than setup(), typically; and I've already seen occasional crashes with some client drivers that explicitly don't claim to support multi-threaded environments.)

For what it's worth, now that Vertica supports UDLs written in Java, I'm of the opinion that JDBC would be a better tool than ODBC to implement this connector. ODBC has some issues regarding thread-safety, consistent standardization, and configuration that I think JDBC does in a way that's better for this application. I unfortunately don't have time to port this code at the moment. But if someone wants a good weekend project, go for it :-)

@aseering
Copy link
Contributor

Incidentally, in the absence of a general fix, workarounds are discussed at the above forum post.

@RomainLeclair
Copy link

Hi!
The link of the forum above does not work anymore.
There is therefore no clearly identified solution ? :)
Thanks :

@h-serizawa
Copy link
Contributor

@RomainLeclair
Please increase the value of UDxFencedBlockTimeout configuration parameter. The default value is 60 which means 60sec.

ALTER DATABASE DEFAULT SET UDxFencedBlockTimeout = <New value>;

@RomainLeclair
Copy link

@h-serizawa
Thanks you for the information, I was able to find this one with a little digging :)
Unfortunately I have a new problem ...
I try to copy a big table but I have this error that comes back at random timing

[Vertica][VJDBC](3399) ERROR: Failure in UDx RPC call InvokeSetupUDL(): UDx side process has exited abnormally, caused by: NonTransientException: [Vertica][VJDBC](3399) ERROR: Failure in UDx RPC call InvokeSetupUDL(): UDx side process has exited abnormally

I try to play with the different connection parameters but for the moment always the same problem..

@h-serizawa
Copy link
Contributor

@RomainLeclair
Can you provide detailed information to break down the issue and reproduce it?

  1. Log messages in UDxFencedProcesses.log and vertica.log related to this transaction.
  2. Any error happened on the remote database.
  3. Data size and row count you are trying to copy from the remote database to Vertica.

@RomainLeclair
Copy link

@h-serizawa
Hi,
For the first two points, i do not have acces to these files. I will make the request and get back to you as soon as I have this information :)
3.

  • Data Size : 38186.81Mb
  • Row Count: 211,354,083

Do not hesitate if you need more information or other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants