After browsing the source code, I found below code changed by kohsuke in
Queue.java[1],

+// private final FifoMap<Integer,LeftItem> leftItems = new
FifoMap<Integer,LeftItem>(256);+ private final Cache<Integer,LeftItem>
leftItems = CacheBuilder.newBuilder().expireAfterWrite(5*60, TimeUnit.
SECONDS).build();


A fixed size map was replaced by a cache which drops the items that lives
more than 3 minutes.

Does it mean the third party who are using remote APIs to track the job
information having to fetch the corresponding job information via queue
item in 3 minutes?

What will happen if the queue item is blocked than 3 minutes due to no
available executor or quiet time exceeding 3 minutes? They will be removed
as well?

Thanks.

[1]
https://github.com/jenkinsci/jenkins/commit/84a259388c0a1a0d7e70b3d870c10f52e1205c8b#diff-7e8de48a31688987a2521079ff3828b9R177



Kane

On Fri, Sep 11, 2015 at 2:11 PM, zhu kane <kane...@gmail.com> wrote:

> I am using Jenkins LTS 1.609.2. My app heavily depends on Jenkins remote
> APIs to run new job then fetch the job result later.
>
> I noticed the Jenkins server throws 404 not found error when fetching the
> detail job information via queue item API.
>
> The Jenkins server was not restarted and always runs well.
>
> From the log of my app, I could see the 404 responses few times, it does
> not always happens. However it occurred again in few queue number.
>
> I know there is a known bug JENKINS-27256 that had been fixed in 1.603.
> Looks like they are different issues. Does Jenkins only store queue item
> records in memory? I observed the queue number reseted after restarting
> Jenkins server. And is Jenkins using weak or soft reference to keep the
> queue item records? So they might lost if GC happens.
>
> *Failed to fetch job status from       queue url
> 'http://127.0.0.1:8888/queue/item/378/
> <http://127.0.0.1:8888/queue/item/378/>', received code '404' and message
> '<html>*
>
> *63736 <head>*
>
> *63737 <meta http-equiv="Content-Type" content="text/html;
> charset=ISO-8859-1"/>*
>
> *63738 <title>Error 404 Not Found</title>*
>
> *63739 </head>*
>
> *63740 <body><h2>HTTP ERROR 404</h2>*
>
> *63741 <p>Problem accessing /queue/item/378/api/json. Reason:*
>
> *63742 <pre>    Not Found</pre></p><hr /><i><small>Powered by
> Jetty://</small></i><br/>*
>
> *...*
>
> *<body><h2>HTTP ERROR 404</h2>*
>
> *63830 <p>Problem accessing /queue/item/382/api/json. Reason:*
> *...*
>
> *64224 <body><h2>HTTP ERROR 404</h2>*
>
> *64225 <p>Problem accessing /queue/item/389/api/json. Reason:*
>
> Kane
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAM%2BCGXSy8OXUmXyP%2BoTY%2BBfDme5hA82dG%3DaZkudO9NsR57G0sg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to