Pmiazga has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/391072 )

Change subject: Lower render queue timeout to 60 seconds
......................................................................


Lower render queue timeout to 60 seconds

Marco says "90s is too high given the average amount of time it takes to
actually create the PDF ...".

Also fix up the logging messages, and make task IDs more unique.

Bug: T178501
Change-Id: Ie316bf281b0f82dfb74123243d797e3f8931e486
---
M config.dev.yaml
M lib/queue.js
2 files changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Mobrovac: Looks good to me, but someone else must approve
  Pmiazga: Verified; Looks good to me, approved



diff --git a/config.dev.yaml b/config.dev.yaml
index ce24eb4..22792b5 100644
--- a/config.dev.yaml
+++ b/config.dev.yaml
@@ -97,4 +97,4 @@
       # the maximum number of puppeteer instances that can be launched at a 
time
       render_concurrency: 1
       # don't wait to render a PDF after this many seconds
-      render_queue_timeout: 90
\ No newline at end of file
+      render_queue_timeout: 60
\ No newline at end of file
diff --git a/lib/queue.js b/lib/queue.js
index 63ec493..19708c9 100644
--- a/lib/queue.js
+++ b/lib/queue.js
@@ -48,13 +48,13 @@
       */
     _onBeforePush(data, callback) {
         const that = this;
-        data._id = uuid.TimeUuid.now().toString();
+        data._id = `${uuid.TimeUuid.now().toString()}|${data.uri}`;
         data._timeoutID = setTimeout(() => {
             that._queueObject.remove((worker) => {
                 if (worker.data._id === data._id) {
-                    that._logger.log('trace/warning', {
+                    that._logger.log('warn/queue', {
                         msg: `Queue is still busy after waiting ` +
-                            `for ${that._timeout} secs.`
+                            `for ${that._timeout} secs. Data ID: ${data._id}.`
                     });
                     callback(callbackErrors.queueBusy, null);
                     return true;
@@ -106,7 +106,7 @@
                 callback(null, pdf);
             })
             .catch((error) => {
-                this._logger.log('trace/error', {
+                this._logger.log('error/render', {
                     msg: `Cannot convert page ${data.uri} to PDF.`,
                     error
                 });

-- 
To view, visit https://gerrit.wikimedia.org/r/391072
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie316bf281b0f82dfb74123243d797e3f8931e486
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/chromium-render
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <bmansu...@wikimedia.org>
Gerrit-Reviewer: Bmansurov <bmansu...@wikimedia.org>
Gerrit-Reviewer: Mobrovac <mobro...@wikimedia.org>
Gerrit-Reviewer: Pmiazga <pmia...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to