Fn function terminates before timeout - fn

I have set the timeout in func.yaml to 300 seconds (5 minutes) but the function only runs for 2 minutes and then terminates with error code 502.
Error invoking function. status: 502 message: error receiving function response
There is a github issue that discusses this problem:
https://github.com/fnproject/fn/issues/723
How do I resolve this problem?
Edit:
As an example, I created a nodejs function which should respond after 270 seconds but doesn't due to early timeout.
fdk.handle(function(input){
return new Promise((resolve,reject)=>{
setTimeout(()=>resolve("Hello"),270000);
});
})

Related

Fastly 400 error "exceeding_max_backends" when creating Fastly Service through pulumi

I sometimes get a 400 error when creating my Fastly Service through pulumi. The error message is below.
error: 1 error occurred:
* updating urn:my:cdn: 400 - Bad Request:
Title: Bad request
Detail: Exceeding max_backends: 5
I've had more than 5 backends in other Fastly services, and if I retry the deployment the 400 error goes away. Has anyone else encountered this error?
I found out I have to raise the limits on our fastly account https://docs.fastly.com/en/guides/resource-limits

org.hibernate.TransactionException: transaction timeout expired

I am getting while running all my test cases which is about 400. It is able to run for some tests but for 130 I am getting the error org.hibernate.TransactionException: transaction timeout expired, but when I run that specific test which has the same error then it passes. any suggestion would be welcome.
the error message is:
org.hibernate.TransactionException: transaction timeout expired at
org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.determineRemainingTransactionTimeOutPeriod(JdbcCoordinatorImpl.java:271)

Randomly Login Timeout Expired errors from SQL 2000 DTS against SQL2008R2 databases

I have some JOBs running on SQL Server 2000, which are calling stored procedures or queries against remote SQL Servers (different editions).
The JOB calls a DTS, and is the DTS who does the remote connection and executes the Stored Procedure or gets a query results from the remote server.
This has been working without errors for years. I don't know why during the last month, I'm having randomly errors on these kind of jobs... I've read some other posts and seems to be related to a security issue, but I repeat, the most of times the jobs are working, only some runs are failing with the error.
Executed as user: SERVER\user. DTSRun: Loading... DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSDynamicPropertiesTask_2 DTSRun OnError:
DTSStep_DTSDynamicPropertiesTask_2, Error = -2147467259 (80004005)
Error string: Login timeout expired Error source: Microsoft OLE DB
Provider for SQL Server Help file: Help context: 0
Error Detail Records: Error: -2147467259 (80004005); Provider Error: 0 (0)
Error string: Login timeout expired Error source: Microsoft OLE DB Provider for SQL Server
Help file: Help context: 0 DTSRun OnFinish:
DTSStep_DTSDynamicPropertiesTask_2 DTSRun: Package execution complete.
Process Exit Code 1. The step failed.
I really don't know what to check. After reboot the server the problems are still there. Any help from you guys would be appreciated.
EDIT 2019-02-14 16:15 -------------------------------------------------------------------------------------------
One of the solutions I found has been to change the Remote Login Timeout property from the default 20 seconds to 30 seconds, or to 0 (Zero means without timeout), by executing the next code:
sp_configure 'remote login timeout', 30 --Or 0 seconds for infinite
go
reconfigure with override
go
From: https://support.microsoft.com/es-es/help/314530/error-message-when-you-execute-a-linked-server-query-in-sql-server-tim
I've tried this solution changing it to 30 seconds, but with the same result. Of course I didn't set it to 0 for obvious reasons, the timeouts are there for something. And also tried 300 seconds (5 minutes to make a login!) and still the same.
EDIT 2019-02-25 11:25 -------------------------------------------------------------------------------------------
Very similar to my problem, still not solved...
https://www.sqlservercentral.com/Forums/Topic1727739-391-1.aspx
For the moment I have a temp solution, and it is to increase the Connect Timeout on the Connection object.
It was blank (probably using its default value).
Since I changed this property (Connection Object > Advanced... > Connect Timeout) to 300 I'm not having the problems on these DTS. I leaved 2 DTS without the change to ensure I continued having the problem, and these are the only ones which continue having the problem. The changed ones are working fine now.

How to make more than 1000 requests per second through Gatling?

I am using the following setup which generates more than 3000 rps. Requirement is to test with up to 4k rps.
The setup that I am using is:
setUp(scn.inject(constantUsersPerSec(8) during(10 minutes)).protocols(httpConf)).throttle(
reachRps(1000) in (20 seconds),
holdFor(5 minute),
jumpToRps(2000),
holdFor(5 minute)
)
The error that I am getting is the following:
17:18:15.603 [gatling-http-thread-1-1] WARN i.gatling.http.ahc.ResponseProcessor - Request 'Home' failed: j.n.ConnectException: handshake timed out
But Gatling seems to fail, above 1000 rps. Is there a way we can do that?

SQL timeout on Azure website suddenly started when return large number (1500) rows

Azure Website with EF6 just started to get timeout on pages where I retrieve more than about 1000 rows. (unsure about the limit, works on 400 or less, fails on 1500 or more)
[Win32Exception (0x80004005): The wait operation timed out]
[SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. This failure occurred while attempting to connect to the routing destination. The duration spent while attempting to connect to the original server was - [Pre-Login] initialization=1; handshake=21; [Login] initialization=0; authentication=0; [Post-Login] complete=1; ]
The app has been running smoothly for several month I just noticed today. Any ideas?
(In case the error is still present: Page with err: http://fartslek.no/fartslek/15 Page without err: http://fartslek.no/fartslek/3 )