Removed Image Optimizer job from Automated Jobs... how to add back?

Permalink Browser Info Environment
Hello,
The Image Optimizer in Optimization >> Automated Jobs was spinning endlessly, so I deleted it. Now I'm not sure how to add it back? Re-install the plugin?
Thanks,
Paul

Type: Ticket
Status: Archived
facechomp
View Replies:
A3020 replied on at Permalink Reply
A3020
Hi Paul, there's a button to "Reset all Jobs", if you press it, it'll reset the "RUNNING" state.

PS. I'd recommend executing the optimizer via CLI (see FAQ pages), as it'd give you more insight and is generally a better way to run these kind of jobs.
facechomp replied on at Permalink Reply
facechomp
Hi A3020,
Thanks for your reply. When I click to reset jobs, Image Optimization is still not appearing in the list.
When I check the "Add Functionality" area, I can see that Image Optimizer v.3.2.9 is installed, so I'm not sure.
I'll check out the CLI instead, like you suggested.
Thanks!
A3020 replied on at Permalink Reply
A3020
Ah, I now see you actually deleted the job. In that case you need to uninstall de add-on, and then install it again.
facechomp replied on at Permalink Reply
facechomp
Exactly, I did just figure that out... it's working fine through providing a TinyPNG API Key. Although, I'm not sure it is working fine, really... for a moment it gave the dialog "Internal Server Error", and running the plugin via the Automated Jobs page, it's currently stuck on "Image 1 of 58."
I'm not sure whether this is a problem with the Image Optimizer plugin for me, or maybe it's more like what you said, I should do this through the CLI. I'm really going to try that, now that I'm seeing how difficult it is through the Automated Jobs interface.
Thanks again!
A3020 replied on at Permalink Reply
A3020
OK. Let me know how it goes via CLI. If you get an error, I'll definitely look into it.
facechomp replied on at Permalink Reply
facechomp
Hi!
I couldn't get cPanel >> Terminal working, so I used SSH / PuTTY. I was able to launch the job, and it began working, but finished with some errors (apologies, the putty.log file has extra escape characters in it): (The first error is "An exception occurred while executing 'UPDATE Jobs SET jStatus=?, jLastStat")

#=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2020.02.06 02:11:01 =~=~=~=~=~=~=~=~=~=~=~=
login as:<<snipped>>
A3020 replied on at Permalink Reply
A3020
Interesting! So it has to do with MySQL closing the connection before the CLI command can mark the job as finished. Maybe the connection was 'idle' for too long. Not sure how to fix that to be honest.

I expect you don't get this error if you re-run the CLI command?
facechomp replied on at Permalink Reply
facechomp
HOWEVER, the good news is: when I look at Files >> Image Optimizer >> Optimized Images, they're all optimized properly. :-)
facechomp replied on at Permalink Reply 1 Attachment
facechomp
Grr, but now after running it from the CLI, it's flashing in the Automated Jobs page and still "running." (See attached screenshot.)
I don't want it churning away in the background. Maybe I should delete the job, but that removes the plugin. :-(
A3020 replied on at Permalink Reply
A3020
It's because MySQL closes the connection, and can't mark the job as 'finished'. So it keeps spinning (thinking it's still running). You'd hit the "Reset all jobs" button on the Automated Jobs page.
facechomp replied on at Permalink Reply
facechomp
Thanks :)
facechomp replied on at Permalink Reply
facechomp
Well, I clicked "Reset All Jobs," and that stopped it. A bit of a fuss, this job.
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.

concrete5 Environment Information

# concrete5 Version
Core Version - 8.5.1
Version Installed - 8.5.1
Database Version - 20190301133300

# concrete5 Packages
ExchangeCore reCAPTCHA (1.1.1), Image Optimizer (3.2.9), Stucco (2.1.6)

# concrete5 Overrides
None

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - On - In all cases.
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
7.2.26

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, intl, ionCube Loader, json, libxml, mbstring, mcrypt, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, readline, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, tidy, timezonedb, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 90
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 120
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
upload_max_filesize - 100M
ic24.api.max_timeout - 7
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 4000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.