Resource icon

MetaMirror 1.6.1

No permission to download
Testing for memory issues at shared hosting(!) or VPS is useless, since both of them virtualize the memory system. I would rather change my hosting provider before I blame an (PHP!) add-on for memory leaks!

If you really want to test for memory leaks, you need your own server.

We have at least a dozen clients, plus myself that I know use this, if this failing on 7 different hosts he's using.. He needs to use better hosting. All our clients are shared and we have no problems at all from this add-on.
 
I have not officially run MetaMirror. I was waiting to setup a CDN before I did so. I've got it set up now with strings to ignore the cdn folders.

My site has a lot of broken image links. I wonder if it's safe to run it even though I have a lot of broken image links? What will MetaMirror do when it encounters a broken image?
 
If I understand the logic of MetaMirror correctly this feature would be rather easy to add for the developer. If it is not already there.
I thought you ran this addon already. Man.. I'm scared I'll slow down the site or crash the server or something with all these broken images.
 
I have a few from 2006 / 2007, and this just ignores them. As above, it would be good if it could remove the broken links.
 
PHP scripts that do not run endlessly (like this add-on) simply cannot affect memory anyhow (except for a very limited time) or produce "memory leaks". They can produce "peaks" only..

After it has finished converting all the existing [IMG] links, then the cron job is unnecessary if you enable "Instant Rehosting", as posts are converted when edited.

It's possibly that running the cron job might result in some spikes memory usage - it does an SQL query which will have to scan the entire message table, so that certainly would do something (although I would have assumed all the memory would have been freed on completion of the task). Perhaps though these momentary spikes are a problem?

So what you could try is disabling the cron job. Tools->Cron Entries->MetaMirror

I wonder though if there's some MySQL configuration issue, like the max size of memory it can use.
 
Okay so I tested it out per directions and everything is good so far thanks to @MattW help. Only question I have is how do I turn this on? All I did was run the cron. Is that all I needed to do?
 
Aha, I need to clarify that. You just go into the MetaMirror Image Rehosting Options, and check "Enable MetaMirror Image Rehosting".

I've updated the instructions:
upload_2013-9-6_16-48-43.webp
 
I've got my metamirror set to run 50 posts in AdminCP/Options

What are yours set to?
 
Mine was set to ten.

Really it's badly architected. It spends the majority of the time waiting for files to download, so really could be left to run pretty much full bore with no drain on the system (other than incoming server bandwidth, which is generally highly underutilized).

But it was my first bit of XF code (and only about the third PHP code), so I kind of hacked it until it worked, and now it's too complicated to change :).

Works though.
 
I'm looking at my data/MetaMirrorCache folder and I only see 32 items.

What's taking so long or did it get stopped? I got this error 22 minutes ago.

Also posted it here: http://xenforo.com/community/threads/bd-attachment-store-paid.49712/page-7#post-629920

ErrorException: rename(/home/blah/public_html/data/MetaMirrorCache/awww.elianthony.com_v1_images_stories_albums_album20_IMG_7854.jpg,/home/blah/public_html/data/attachment-files/2010/11/11695_awww.elianthony.com_v1_images_stories_albums_album20_IMG_7854.jpg): No such file or directory - library/bdAttachmentStore/Model/File.php:305 Generated By: Unknown Account, 21 minutes ago Stack Trace #0 [internal function]: XenForo_Application::handlePhpError(2, 'rename(/home/dr...', '/home/blah/publi...', 305, Array) #1 /home/blah/public_html/library/bdAttachmentStore/Model/File.php(305): rename('/home/blah/publi...', '/home/blah/publi...') #2 /home/blah/public_html/library/bdAttachmentStore/Model/File.php(259): bdAttachmentStore_Model_File->_externalData_moveFile('/home/blah/publi...', '/home/blah/publi...') #3 /home/blah/public_html/library/bdAttachmentStore/Model/File.php(18): bdAttachmentStore_Model_File->_externalData_saveFile(Array, '/home/blah/publi...', '2010/11/11695_1...', 'awww.elianthony...') #4 /home/blah/public_html/library/bdAttachmentStore/XenForo/DataWriter/AttachmentData.php(118): bdAttachmentStore_Model_File->saveFile('external_data', Array, '/home/blah/publi...', '2010/11/11695_1...', 'awww.elianthony...') #5 /home/blah/public_html/library/XenForo/DataWriter/AttachmentData.php(143): bdAttachmentStore_XenForo_DataWriter_AttachmentData->_writeAttachmentFile('/home/blah/publi...', Array) #6 /home/blah/public_html/library/XenForo/DataWriter.php(1397): XenForo_DataWriter_AttachmentData->_postSave() #7 /home/blah/public_html/library/XenForo/Model/Attachment.php(524): XenForo_DataWriter->save() #8 /home/blah/public_html/library/MetaMirror/CronEntry.php(411): XenForo_Model_Attachment->insertUploadedAttachmentData(Object(XenForo_Upload), 180, Array) #9 /home/blah/public_html/library/MetaMirror/CronEntry.php(885): MetaMirror_CronEntry::importPostAttachment(Object(Zend_Db_Adapter_Mysqli), 'awww.elianthony...', '/home/blah/publi...', 180, 16142, 1291083443) #10 /home/blah/public_html/library/MetaMirror/CronEntry.php(1052): MetaMirror_CronEntry::updateSingleContent(Array) #11 /home/blah/public_html/library/MetaMirror/CronEntry.php(544): MetaMirror_CronEntry::runForContentType() #12 [internal function]: MetaMirror_CronEntry::runMetaMirror(Array) #13 /home/blah/public_html/library/XenForo/Model/Cron.php(356): call_user_func(Array, Array) #14 /home/blah/public_html/library/WhoHasReadAThread/Model/Cron.php(30): XenForo_Model_Cron->runEntry(Array) #15 /home/blah/public_html/library/XenForo/Deferred/Cron.php(22): WhoHasReadAThread_Model_Cron->runEntry(Array) #16 /home/blah/public_html/library/XenForo/Model/Deferred.php(198): XenForo_Deferred_Cron->execute(Array, Array, 9.99999594688, '') #17 /home/blah/public_html/library/XenForo/Model/Deferred.php(321): XenForo_Model_Deferred->runDeferred(Array, 9.99999594688, '', false) #18 /home/blah/public_html/library/XenForo/Model/Deferred.php(274): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false) #19 /home/blah/public_html/deferred.php(18): XenForo_Model_Deferred->run(false) #20 {main} Request State array(3) { ["url"] => string(29) "http://8thos.com/deferred.php" ["_GET"] => array(0) { } ["_POST"] => array(4) { ["_xfRequestUri"] => string(34) "/admin.php?options/list/MetaMirror" ["_xfNoRedirect"] => string(1) "1" ["_xfToken"] => string(8) "********" ["_xfResponseType"] => string(4) "json" } }
 
Might be incompatible with Attachment Store. What do you have Attachment Store configured to do?

More likely might just be because you were running the testing tool while MetaMirror was enabled, so it was running simultaneously with the cron job.
 
Might be incompatible with Attachment Store. What do you have Attachment Store configured to do?

More likely might just be because you were running the testing tool while MetaMirror was enabled, so it was running simultaneously with the cron job.
Screen Shot 2013-09-06 at 7.58.53 PM.webp
Screen Shot 2013-09-06 at 7.59.34 PM.webp
 
Might be incompatible with Attachment Store. What do you have Attachment Store configured to do?

More likely might just be because you were running the testing tool while MetaMirror was enabled, so it was running simultaneously with the cron job.
Yes. I did run the testing tool while MetaMirror was enabled. @MattW configured everything for me earlier. About 6 hours later I decided to test out metamirror and forgot that it was already enabled. But the fact that there are only 32 pictures in the data/MetaMirrorCache folder after 6 hours means it wasn't running at all. I'm wondering if the tests I ran is what caused images to go in there in the first place.
 
Top Bottom