ABP IO Worker / BackgroundJob gives "Failed Execusion DB command (1ms)" - abp

I'm using ABP IO 4.4.4 and I'm running a Worker that is scheduled every 10 seconds. And at each execution a job is created using BackgroundJobManager. In the Job there is a simple insert statement executed through a Repository. The insert I've done is a batch insert meaning InsertManyAsync was invoked. I noticed below error message when executing. Some of the records had been inserted some were lost. I have a feeling like this is thrown because of DB server? I'm not sure. Anyone got any helpful ideas on this? thank you

Related

net.snowflake.client.jdbc.internal.apache.http.impl.execchain.RetryExec: I/O exception while executing DDL

I am trying to executing a DDL query using snowflake jdbc driver:
Create table table_destination
as select * from table_source
I am seeing these errors in logs. Although, table in snowflake is created successfully.
error:
net.snowflake.client.jdbc.internal.apache.http.impl.execchain.RetryExec: I/O exception (net.snowflake.client.jdbc.internal.apache.http.NoHttpResponseException) caught when processing request to {s}->https://xyz.snowflakecomputing.com:443: The target server failed to respond
It seems like table creation is taking too long and snowflake is retrying to get response. Can someone please explain what's happening here?
I found this post.( https://github.com/DigitalPebble/storm-crawler/issues/405 )
Try ensure automatic retries is enabled.
E.g.
builder = HttpClients.custom().setUserAgent(userAgent)
.setConnectionManager(CONNECTION_MANAGER)
.setConnectionManagerShared(true).disableRedirectHandling();
//.disableAutomaticRetries();

Screen/Database query keep on loading/executing unless sql service is restarted

I am using MVC razor in one of the Web Application using .Net
One of the screen in my web application has 2 DropDownList, 1 button and 1 Grid. When I click on 1st DDL, the screen instead of focusing on 2nd DDL it starts to keep on loading.. and gives exception: the timeout period expired prior to completion of the operation
DDL select query is: select * from Table where year='2014'and name='pqr'(used in code behind Entity Framework) which throws this exception. Same thing is happening in DB, when I run the above LINQ query in SSMS, it keeps on executing.
If I restart SQL Service, everything starts to work normal and the result is shown but after some time if I try same then again the same issue occurs. In this case, I need to restart the sql service again and again which shouldn't happen.
In SSMS, I checked Activity Monitoring and found that sometimes some SPId's are getting blocked and that time only screen/query keep on loading/executing.
Using DBCC INPUTBUFFER(spid);I came to know which Stored Procedure / Table is blocking (please correct if my understanding is wrong here). I also tried using with (NOLOCK) on certain tables inside Stored Proc, which also didn't workout for me.
How can I resolve this issue at DB level? My application is already live.
Note: This issue occurs intermittently.

How to stop Oracle dbms_job

My dbms_job has been running for nearly thirty days.
The number of total time keeps rising, but I can't find any info of the running job.
When I execute sql that is "select * from dba_jobs;", the result shows no job is running.
I set it to broken, but it doesn't work.
How can I stop this dbms_job safely?
DBA_JOBS lists all the jobs created in the database. You could use DBA_JOBS_RUNNING view to list all jobs that are currently running in the instance.
When I execute sql that is "select * from dba_jobs;", the result shows no job is running.
This shows all the jobs created using DBMS_JOBS package. The job might have created using DBMS_SCHEDULER package.
SQL> select job from user_jobs;
JOB
----------
99
I have created only one job using DBMS_JOBpackage which is called 99.
Others are created using DBMS_SCHEDULERpackage which can be seen using:
SQL> select job_name from user_scheduler_jobs;
As per the documentation-
Stopping a Job
Note that, once a job is started and running, there is no easy way to stop the job.
Its not easy to stop the job.
Don't know which version of Oracle database are you using. But starting with Oracle 10g You use the following query to list the scheduled jobs.
SQL>select * from all_scheduler_jobs;
ALL_SCHEDULER_JOBS
ALL_SCHEDULER_JOBS displays information about the Scheduler jobs accessible to the current user.More...
Use the following query to find the currently running job.
SQL>select job_name, session_id, running_instance, elapsed_time, cpu_used
from user_scheduler_running_jobs;
And to stop-
SQL>EXEC DBMS_SCHEDULER.STOP_JOB (job_name => 'JOB_NAME');
Short of killing the session, you're out of luck.
From the Documentation:
Note that, once a job is started and running, there is no easy way to stop the job.
That's one of the many reasons why you shouldn't use dbms_job anymore. Use dbms_scheduler instead.
checkout SID in "select * from DBA_JOBS_RUNNNG"
thats session ID
kill that session and thats it changes will be rolled back, so it can take "more" time to abort than letting it finish if that bulk update was 90% complete....

Activation script hangs and cannot shutdown

I have implemented SQL Server Service Broker with error handling according to this article by Remus Resanu.
When I ran the process and the activation script got kicked off but never stopped processing. According to the SQL Server log file it looks like I have a typo in my error handling and it is now stuck in an infinite loop.
I have tried to kill the process using kill <pid> but I get the message Only user processes can be killed. I have also tried restarting the server but the activation script would start again.
How do I kill the runaway activation process?
I was not able to find a solution through google/bing search. I eventually remembered that we enabled the Service broker through a SQL command, so I tried disabling it and that seems to have worked:
ALTER DATABASE dbname SET DISABLE_BROKER;
It looks like undocumented feature. If activated procedure do not issue END CONVERSATION it keeps restarting in an infinite loop. So, to stop it you need to make it successfully run END CONVERSATION of any dialog. If the queue gets disabled due to poison message detection you need to drop it to stop activation proc - no need to reset broker. I did not found either solution to this problem out there so I played with it a bit and hope this gives you a hint.

Why did my SSIS package complete with an error while there seems to be no errors?

I have a package with one data flow task. In the data flow task it copies data from one database to another archive database.
I linked two precedence constraints. If it's successful it should go on and start a certain job in SQL Server (delete records from the original database). If the task fails, it should return a script task saying that it failed.
When I run this, the data flow task is successful (every record gets copied). The data flow task gets a green tick. The "execute SQL Server Agent Job Task" also gets a green tick. Yet after completing the package it says
"Package execution completed with error. Click here to switch to design mode, or select Stop Debugging from the Debug menu."
I included a screenshot of it:
The output basically only says:
SSIS package "c:\Users\Kim\Documents\Visual Studio 2012\Projects\POC\POC\Archive.dtsx" finished: Failure.
So:
Where can I find the error? There is no indication at all what went wrong. Both show green ticks and the migration of data did went well indeed. The SQL Server job didn't do its job. The records are still there. So I have a feeling that the error has to do with the job. I have to mention it is the Change Data Capture cleanup job which was automatically made when I turned on CDC on this table. I did this because I only want this job to happen when the data flow task is successful (instead of running the schedule by default).
If it failed, why didn't it follow the precedence constraint for failure (showing the script)?
SQL Server agent is turned on by the way.
Can someone please help me? I googled "Package execution completed with error" and I literally get only 68 results which are not helping.
Kim
I recreated the entire package and it completed with success. I'm still wondering what the difference is with my original package, but I'm guessing it might have something to do with non-corresponding meta-data. When making the original package I had copied a few tasks and then made new tasks and deleted the copied ones (because it was easier to look between them instead of switching between SSIS projects). I deleted all the old copied tasks, but possibly something went wrong there and that something is still linked to old metadata. All the tasks are performing though.
Mike en Ennor thanks for looking into the problem. If anyone has any clue what it could be, please reply anyway, because my solution to recreate the package again was not a satisfying solution.
Kim
Did you look at the Event Handlers? Also, any other failed configurations or Loggings in the background? These three could be possible culprits. Any other Tasks that are disabled and are using an old connection string that no longer resides on the package?
I got the same issue.
Try going through each event handler tab, data flow tab for Evey executable while in the execution / run mode. You would be able to see red Cross marks where the error is.
Run the workflow > click the "Progress" button to see red X's.

Resources