[ 
https://issues.apache.org/jira/browse/CONNECTORS-1592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16808652#comment-16808652
 ] 

Karl Wright edited comment on CONNECTORS-1592 at 4/3/19 12:08 PM:
------------------------------------------------------------------

[~goovaertsr], when a large number of queries are blocked and do not get 
executed for a while (in this case 2706114 ms or so), then when all of them 
finally fire they are all reported as "slow running queries".  The question is: 
why are all of these queries blocked?

Tuple bloat just makes the database generally get slower and slower, so that is 
not it.

If you execute "VACUUM FULL" while ManifoldCF is running, that *could* do it, 
since tables get completely locked one at a time and are recreated.  It is 
recommended that you either shut ManifoldCF down during this time, or create a 
"signalling file" which tells ManifoldCF to not do any real work until it goes 
away.  Your choice.  If you want to know more about the latter option, please 
let me know.

If this isn't due to a concurrent "VACUUM FULL", then we're left with finding 
some other cause.  While it is taking place, there may be a way of getting 
Postgresql's state across all requests; that would be the ideal way to figure 
it out.

FWIW, the following query should be instantaneous, which is why it appears to 
me that the whole database is locked down somehow:

{code}
WARN 2019-03-08T23:58:20,338 (qtp550147359-413) - Found a long-running query 
(2706114 ms): [SELECT 
t0.id,t0.description,t0.status,t0.starttime,t0.endtime,t0.errortext FROM jobs 
t0 ORDER BY description ASC]
{code}



was (Author: kwri...@metacarta.com):
[~goovaertsr], when a large number of queries are blocked and do not get 
executed for a while (in this case 132000ms or so), then when all of them 
finally fire they are all reported as "slow running queries".  The question is: 
why are all of these queries blocked?

Tuple bloat just makes the database generally get slower and slower, so that is 
not it.

If you execute "VACUUM FULL" while ManifoldCF is running, that *could* do it, 
since tables get completely locked one at a time and are recreated.  It is 
recommended that you either shut ManifoldCF down during this time, or create a 
"signalling file" which tells ManifoldCF to not do any real work until it goes 
away.  Your choice.  If you want to know more about the latter option, please 
let me know.

If this isn't due to a concurrent "VACUUM FULL", then we're left with finding 
some other cause.  While it is taking place, there may be a way of getting 
Postgresql's state across all requests; that would be the ideal way to figure 
it out.


> Found long running query in manifold scheduled job
> --------------------------------------------------
>
>                 Key: CONNECTORS-1592
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1592
>             Project: ManifoldCF
>          Issue Type: Bug
>    Affects Versions: ManifoldCF 2.12
>            Reporter: Subasini Rath
>            Priority: Major
>
> Hi Karl,
>    I am also facing the above mentioned issue. (Similar to Connector-880)
> I am using manifold2.12 binary version. I am using Solr output connector and 
> Web repository connection. Manifold is using all default configuration.
> When I am running the jobs manually, it runs fine. Same jobs have been 
> scheduled to run everyday.
> I am getting below exceptions and the job gets hanged/ going to waiting stage.
> Could you please help me in resolving the same.
> I am getting the below error -
> Scenario-1
> WARN 2019-03-08T23:58:20,338 (qtp550147359-413) - Found a long-running query 
> (2706114 ms): [SELECT 
> t0.id,t0.description,t0.status,t0.starttime,t0.endtime,t0.errortext FROM jobs 
> t0 ORDER BY description ASC]
>  WARN 2019-03-08T23:58:20,337 (Document delete stuffer thread) - Found a 
> long-running query (2737370 ms): [SELECT id FROM jobs WHERE status=? LIMIT 1]
>  WARN 2019-03-08T23:58:20,339 (Job reset thread) - Found a long-running query 
> (2770133 ms): [SELECT id FROM jobs WHERE status IN (?,?)]
>  WARN 2019-03-08T23:58:20,386 (Document delete stuffer thread) - Parameter 0: 
> 'e'
>  WARN 2019-03-08T23:58:20,337 (Set priority thread) - Found a long-running 
> query (2732379 ms): [SELECT id,dochash,docid,jobid FROM jobqueue WHERE 
> needpriority=? LIMIT 1000]
>  WARN 2019-03-08T23:58:20,386 (Set priority thread) - Parameter 0: 'T'
>  WARN 2019-03-08T23:58:20,386 (Job reset thread) - Parameter 0: 'I'
>  WARN 2019-03-08T23:58:20,386 (Job reset thread) - Parameter 1: 'i'
>  WARN 2019-03-08T23:58:20,372 (Seeding thread) - Parameter 2: '1552047176062'
>  WARN 2019-03-08T23:58:20,474 (Document cleanup stuffer thread) - Found a 
> long-running query (2737524 ms): [SELECT id FROM jobs WHERE status=? LIMIT 1]
>  WARN 2019-03-08T23:58:20,474 (Document cleanup stuffer thread) - Parameter 
> 0: 'S'
>  WARN 2019-03-08T23:58:20,474 (Finisher thread) - Found a long-running query 
> (2752034 ms): [SELECT id FROM jobs WHERE status IN (?,?,?) FOR UPDATE]
>  WARN 2019-03-08T23:58:20,474 (Finisher thread) - Parameter 0: 'A'
>  WARN 2019-03-08T23:58:20,475 (Finisher thread) - Parameter 1: 'W'
>  WARN 2019-03-08T23:58:20,475 (Finisher thread) - Parameter 2: 'R'
>  WARN 2019-03-08T23:58:20,475 (Delete startup thread) - Found a long-running 
> query (2752036 ms): [SELECT id FROM jobs WHERE status=? FOR UPDATE]
>  WARN 2019-03-08T23:58:20,475 (Delete startup thread) - Parameter 0: 'E'
>  WARN 2019-03-08T23:58:20,483 (qtp550147359-4339) - Found a long-running 
> query (2496641 ms): [SELECT 
> t0.id,t0.description,t0.status,t0.starttime,t0.endtime,t0.errortext FROM jobs 
> t0 ORDER BY description ASC]
>  WARN 2019-03-08T23:58:20,492 (Finisher thread) - Plan: 
> isDistinctSelect=[false]
>  WARN 2019-03-08T23:58:20,492 (Finisher thread) - Plan: isGrouped=[false]
>  WARN 2019-03-08T23:58:20,492 (Finisher thread) - Plan: isAggregated=[false]
>  WARN 2019-03-08T23:58:20,492 (Finisher thread) - Plan: columns=[ COLUMN: 
> PUBLIC.JOBS.ID not nullable
>  WARN 2019-03-08T23:58:20,492 (qtp550147359-4346) - Found a long-running 
> query (2435908 ms): [SELECT 
> t0.id,t0.description,t0.status,t0.starttime,t0.endtime,t0.errortext FROM jobs 
> t0 ORDER BY description ASC]
>  WARN 2019-03-08T23:58:20,492 (Finisher thread) - Plan: 
>  WARN 2019-03-08T23:58:20,492 (Finisher thread) - Plan: ]
>  WARN 2019-03-08T23:58:20,499 (Finisher thread) - Plan: [range variable 1
>  WARN 2019-03-08T23:58:20,499 (Finisher thread) - Plan: join type=INNER
>  WARN 2019-03-08T23:58:20,499 (Finisher thread) - Plan: table=SYSTEM_SUBQUERY
>  WARN 2019-03-08T23:58:20,499 (Finisher thread) - Plan: cardinality=0
>  WARN 2019-03-08T23:58:20,499 (Finisher thread) - Plan: access=FULL SCAN
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: join condition = 
> [index=SYS_IDX_13329
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: ]
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: ][range variable 2
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: join type=INNER
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: table=JOBS
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: cardinality=3
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: access=INDEX PRED
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: join condition = 
> [index=I1549955498033
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: start conditions=[
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: EQUAL arg_left=[ 
> COLUMN: PUBLIC.JOBS.STATUS
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: ] arg_right=[ COLUMN: 
> C1
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: ]]
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: end condition=[
>  WARN 2019-03-08T23:58:20,500 (Finisher thread) - Plan: EQUAL arg_left=[ 
> COLUMN: PUBLIC.JOBS.STATUS
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: ] arg_right=[ COLUMN: 
> C1
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: ]]
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: other condition=[
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: EQUAL arg_left=[ 
> COLUMN: PUBLIC.JOBS.STATUS
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: ] arg_right=[ COLUMN: 
> C1
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: ]]
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: ]
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: ]]
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: PARAMETERS=[
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: @0[DYNAMIC PARAM: , 
> TYPE = VARCHAR
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: ]
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: @1[DYNAMIC PARAM: , 
> TYPE = VARCHAR
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: ]
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: @2[DYNAMIC PARAM: , 
> TYPE = VARCHAR
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: ]]
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: SUBQUERIES[
>  WARN 2019-03-08T23:58:20,501 (Finisher thread) - Plan: [level=1
>  WARN 2019-03-08T23:58:20,502 (Finisher thread) - Plan: value expression]]
>  WARN 2019-03-08T23:58:20,502 (Finisher thread) - 
>  WARN 2019-03-08T23:58:20,504 (Delete startup thread) - Plan: 
> isDistinctSelect=[false]
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: 
> isGrouped=[false]
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: 
> isAggregated=[false]
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: columns=[ 
> COLUMN: PUBLIC.JOBS.ID not nullable
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: 
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: ]
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: [range variable 
> 1
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: join type=INNER
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: table=JOBS
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: cardinality=3
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: access=INDEX 
> PRED
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: join condition 
> = [index=I1549955498033
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: start 
> conditions=[
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: EQUAL 
> arg_left=[ COLUMN: PUBLIC.JOBS.STATUS
>  WARN 2019-03-08T23:58:20,505 (Delete startup thread) - Plan: ] arg_right=[ 
> DYNAMIC PARAM: , TYPE = CHARACTER
>  WARN 2019-03-08T23:58:20,507 (Delete startup thread) - Plan: ]]
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: 
> isDistinctSelect=[false]
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: 
> isGrouped=[false]
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: 
> isAggregated=[false]
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: 
> columns=[ COLUMN: PUBLIC.JOBS.ID not nullable
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: 
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: ]
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: 
> [range variable 1
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: join 
> type=INNER
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: 
> table=JOBS
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: 
> cardinality=3
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: 
> access=INDEX PRED
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: join 
> condition = [index=I1549955498033
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: start 
> conditions=[
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: EQUAL 
> arg_left=[ COLUMN: PUBLIC.JOBS.STATUS
>  WARN 2019-03-08T23:58:20,507 (Delete startup thread) - Plan: end condition=[
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: ] 
> arg_right=[ DYNAMIC PARAM: , TYPE = CHARACTER
>  WARN 2019-03-08T23:58:20,507 (Document cleanup stuffer thread) - Plan: ]]
>  WARN 2019-03-08T23:58:20,507 (Delete startup thread) - Plan: EQUAL 
> arg_left=[ COLUMN: PUBLIC.JOBS.STATUS
>  WARN 2019-03-08T23:58:20,508 (Document cleanup stuffer thread) - Plan: end 
> condition=[
>  WARN 2019-03-08T23:58:20,508 (Delete startup thread) - Plan: ] arg_right=[ 
> DYNAMIC PARAM: , TYPE = CHARACTER
>  WARN 2019-03-08T23:58:20,508 (Document cleanup stuffer thread) - Plan: EQUAL 
> arg_left=[ COLUMN: PUBLIC.JOBS.STATUS
>  
> Scenario-2
> WEB: Illegal seed URL 
> 'http://intranet.abcde.com/wps/wcm/connect/xxx/xxxwebsite/home



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to