Jump to content

Brian Scramlin

Members
  • Posts

    38
  • Joined

  • Last visited

Everything posted by Brian Scramlin

  1. I am speechless I didn't know of the findOne() method! Thank you! Thank you for writing the imagickal function, it has worked very well for our situation. Originally, I just put minimum-size requirements on the image field, but the client complained right away because of the issue with mug shots. The reason CSS is not able to fully solve our issue is social media sharing. The resolution size is perfectly formatted for sharing on Facebook, which drives about 80% of the traffic. So, server-side processing is preferred. I only wish the client didn't need to upscale any images! Regarding ProCache, I have attached screenshot of what it is being used for. I am not resetting any child pages, parent pages, the home page, or entire site after a page save. I have everything checking out on the cache-side, apart from getting into a CDN, which I have considered. Yes, I am considering a different hosting solution :/ I have really enjoyed the company I am with (siteground.com) as their technicians are very quick to help, but perhaps digitalocean.com or something similar's server configurations would be better suited.
  2. 1. Interesting, I did not know about different engines in MySQL. I am using MyISAM currently, although I see ProCache is using InnoDB. 1.1 ProcessWire 3.0.35 © 2017 2. I am not familiar with MariaDB. I would have to connect with my host to see if that is an option for me. Also, can you elaborate on what moving the database to a second Virtual Private Server would mean and how that would help? 3. I am glad to hear that. This was my understanding as it would serve static HTML with zero server-side processing. But, I didn't know if when the cache was reset if that could cause a spike in resources. I do believe everything is being cached correctly, but I can certainly explain the details more if that is a clue. 4. The reason is because processwire does not have the capability to add padding to a small image and make it a specific dimension. To maintain the correct formatting on the home page, I require a specific dimension size and some of the images the client is posting are so small they look awful when sized upward. That led me to utilize the PHP iMagick library already available on my server. Although, I wonder if this function is being executed every time a page is loaded, or only on the first load of the page as is the case with ProcessWire image resizing? I am prepared to take your suggestion regarding switching to InnoDB, as I understanding locking a row instead of the entire table may be more desirable in my situation. I will update you after I do that.
  3. That is good to hear. Let's take the home page for instance, I will only post the find() method calls: <head> <?php $latestArticle = $pages->find("template=article, articleFeatured=1, sort=-created")->first(); ?> </head> <body> <?php $resultsAll = $pages->find("template=article, articleInsider!=1, limit=20, sort=-articleDate, sort=-created") ?> <?php $obituaries = $pages->find("template=obituary, limit=5, sort=-obitDate"); ?> </body> However, there are get() calls as well. In case that is relevant: 8 in the <head> 6 in the <body> 1 in the <footer> Although, many of those get() calls have logic controllers such as <?php if ($pages->get("template=site-options")->homeShareImage): ?> and I don't know whether that takes as much resource. As well as 11 eq() WireArray selections--I don't know if selecting out of a WireArray is accessing the database or not. What is occurring is every so often I am getting these resource spikes that cause the site to go down. Now, I am not sure if MySQL is restarting--which is my hunch--or whether something else is going on. I also wonder if it has something to do with the ProCache module? My hosting provider can't figure it out either (I am using a cloud hosting service with 3 CPU Cores, CentOS, 5GB RAM, and 40GB SSD, not shared. My client is getting frustrated with me! TracyDebugger shows no errors, however it does show the exception that is thrown (see attached image). It only lasts a small amount of time, 4 to 28 seconds. But this website has a lot of traffic and a lot of people are not getting through. This month we have had 373,000 sessions in the past 30 days--usually 12-15,000 a day so I can see why my client is upset, especially since I sold him on ProcessWire and cloud hosting. The only other thing I can think of that might be intensive is some image processing. I am using this function to create widescreen versions of small images (like mug shots): <?php //This is an amazing function to use imagick function imagickal($imagePath, $method, array $arguments) { $path_parts = pathinfo($imagePath); $dirname = $path_parts['dirname'] . '/'; $filename = $path_parts['filename']; $mod = $method . '-' . implode($arguments, '-'); $mod = wire('sanitizer')->filename($mod, true); $savename = $dirname . $filename . '_' . $mod . '.jpg'; if (!file_exists($_SERVER['DOCUMENT_ROOT'] . $savename)) { $image = new Imagick($_SERVER['DOCUMENT_ROOT'] . $imagePath); call_user_func_array([$image, $method], $arguments); $image->writeImage($_SERVER['DOCUMENT_ROOT'] . $savename); } return $savename; } ?> And I use it once on the home page and once on the article page like so: <?php $fImage = $latestArticle->articleFeaturedImage; ?> <?php if ($fImage->width < 730): ?> <?php $fImage = imagickal($fImage->url, "thumbnailImage", [730, 350,true,true]); ?> <?php else: ?> <?php $fImage = $fImage->size(730, 350)->url; ?> <?php endif; ?> <img src="<?= $fImage ?>" class="img-fluid" title="<?= $latestArticle->title ?>" alt="<?= $latestArticle->title ?>" /> If anyone has any ideas as to why the "2006 MySQL server has gone away" is occurring I would appreciate it! NOTE: I have attempted this fix already: max_allowed_packet=16M -> 100M wait_timeout=60 -> 300 I do feel this has helped limit how often this is occurring, but I think it is a band-aid, not a solution.
  4. Hey! Quick question, Should I limit how many find() methods I use on a single page? Is it fairly resource-intensive? I am getting consistent 2006 MySQL server has gone away errors and have followed all the suggestions I can find, but wonder if I am just "overloading" my server resources with database requests or something like that? Thank you!
  5. Sorry if this is overly simplistic, but if that is truly all you seek to do, could you just $url = str_replace("-", "--", $sanitizer->pageName($name, true));
  6. Thank you, everyone. I appreciate your input. I understand in most scenarios converting the original file on upload is not the best approach. However, in this situation it seems the best way to save on calling my iMagick function and compression function. First off, I have never created a Processwire module and am intimidated by the prospect, but I am considering the suggested InputfieldImageThumbs module route. Here is the original module: class InputfieldImageThumbs extends WireData implements Module { public function init() { $this->addHookAfter('InputfieldFile::fileAdded', $this, 'createThumbs'); } public function createThumbs($event) { $inputfield = $event->object; $image = $event->arguments("pagefile"); $allowedTypes = array(IMAGETYPE_PNG, IMAGETYPE_JPEG, IMAGETYPE_GIF); // allowed image formats $detectedType = exif_imagetype($image->filename); // check if file is an image if(!in_array($detectedType, $allowedTypes)) return; // if not, exit $widths = explode(",", $this->imageWidths, 10); // convert comma separated list to array, limit to 10 values $widths = array_filter($widths, 'ctype_digit'); // keep only numeric entries in the array foreach($widths as $width) { $image->size($width,0); // generate image for each defined width } } } Here is a stab at my attempted module. I am very new at this, so please prepare yourself class tinifyImages extends WireData implements Module { public function init() { $this->addHookAfter('InputfieldFile::fileAdded', $this, 'tinify'); } public function tinify($event) { $inputfield = $event->object; $image = $event->arguments("pagefile"); $allowedTypes = array(IMAGETYPE_PNG, IMAGETYPE_JPEG, IMAGETYPE_GIF); // allowed image formats $detectedType = exif_imagetype($image->filename); // check if file is an image if(!in_array($detectedType, $allowedTypes)) return; // if not, exit /* Include Tinify API Resources and Initialize */ require_once("inc/tinify-php-master/lib/Tinify/Exception.php"); require_once("inc/tinify-php-master/lib/Tinify/ResultMeta.php"); require_once("inc/tinify-php-master/lib/Tinify/Result.php"); require_once("inc/tinify-php-master/lib/Tinify/Source.php"); require_once("inc/tinify-php-master/lib/Tinify/Client.php"); require_once("inc/tinify-php-master/lib/Tinify.php"); \Tinify\setKey("API_KEY"); //function used to compress with tinify api function tinify($imagePath) { $path_parts = pathinfo($imagePath); $dirname = $path_parts['dirname'] . '/'; $filename = $path_parts['filename']; $savename = $dirname . $filename . '-compressed.jpg'; if (!file_exists($_SERVER['DOCUMENT_ROOT'] . $savename)) { $source = \Tinify\fromFile($_SERVER['DOCUMENT_ROOT'] . $imagePath); $source->toFile($_SERVER['DOCUMENT_ROOT'] . $savename); } return $savename; } $image = tinify($image->url); } } ?> Am I close?
  7. How is it possible for me to run a PHP Function on an image as it is being uploaded? This would be the ideal situation because then anywhere I need to execute the ->size() functions I don't have to re-call my compression service. Right now all over my website I have something like tinify($page->image->size(200,200)->url) instead I would rather just have the tinify() function called on the initial save. Further, if it was possible to do this for every image including CKEditor body images we would be in business! Thank you for your help.
  8. Hey Everyone, I have a question that seems like it would have an obvious answer, but I cannot wrap my mind around it: If I have <img src="<?= $page->featuredImage->size(800,500)->url ?>"/> in an article template, does my server run a resizing script every time someone requests the page? Or, is it resized only the first time it is requested? Or when the page is saved? The reason I would like to know is because I have created two image processing functions my client requires, but one of them is a paid subscription service to compress the images. I don't want to call the paid API every time a page is loaded or something. Thanks for fielding my ignorance
  9. The Slow SQL Logs. I am sorting through these myself, but thought I would share for a second set of eyes. mysql-slow_19_04.txt
  10. Update: My hosting provider made the following modifications max_allowed_packet=16M -> 100M wait_timeout=60 -> 300 Although, I still received errors after they bumped it up :/ Reply to DaveP: Ah, I understand. No, this web application does not pull in external XML or JSON. It is all original content, so that should not be an issue. Even the advertisements are uploaded by the client. I am using Processwire version 3.0.35. I am not sure what the mySQL slow query log is? I can request it from my host (SiteGround), but I wonder if it something I can find under Apache CPanel? I am running this web application on a cloud server with 3 CPU Cores CentOS 5GB RAM 40GB SSD It isn't "dedicated" but it is supposed to load balance, so I don't think another site would be the problem. As you have suggested I will ask for the "mySQL Slow Query Log" from the hosting provider and see what they can give me. Thank you for sticking with me through this. ---- More Information I've been going through the raw server logs. This just occurred this morning and I am thinking maybe there is a problem? Can one of you tell me if this looks like legitimate requests? The reason I wasn't sure is that it looks like so many requests all in the same second. But, I also realize that on each page there may be multiple requests depending on how the template is set up. Please let me know if any of this looks fishy. This is the total "blackout" period when the server reported the following exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) *** ISSUE BEGINS *** Total time: 7 Seconds ***I SORTED THESE BY IP ADDRESS*** 141.8.132.37 - - [19/Apr/2017:08:41:37 -0500] "GET /site/assets/files/1084/x68748d_c42c5fe92b484ab3a34fba0ebadd7a73_mv2_thumbnailImage-800-400-1-1.jpg.pagespeed.ic.uvpGfH63dU.jpg HTTP/1.0" 404 17077 "-" "Mozilla/5.0 (compatible; YandexImages/3.0; +http://yandex.com/bots)" 162.72.69.38 - - [19/Apr/2017:08:41:14 -0500] "GET /site/assets/files/1018/dka.730x170.jpg%20alt=http://drydenwire.com/news/the-dan-king-agency/%20title=http://drydenwire.com/news/the-dan-king-agency// HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:14 -0500] "GET /site/assets/files/2380/tyler-milton-drydenwire.320x240.jpg%20title= HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:15 -0500] "GET /site/assets/files/2375/sean-duffy.320x240.png%20title= HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:16 -0500] "GET /site/assets/files/1018/17201224_1314142275320656_1582408838009383145_n-2.318x318.jpg%20alt=http://www.thebodyshopfitnesscenters.com// HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:16 -0500] "GET /site/assets/files/2369/screen_shot_2017-04-17_at_4_08_21_pm.320x240.png%20title= HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:16 -0500] "GET /site/assets/files/2374/april_2017-1.320x240.jpg%20title= HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:17 -0500] "GET /site/assets/files/1018/110c10_85136d1065d24f7dbc5b06be0044fc2c_mv2.125x125.png%20alt=110c10_85136d1065d24f7dbc5b06be0044fc2c_mv2.png%20title=110c10_85136d1065d24f7dbc5b06be0044fc2c_mv2.png/ HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:26 -0500] "GET /site/assets/files/1018/110c10_85136d1065d24f7dbc5b06be0044fc2c_mv2.125x125.png%20alt=110c10_85136d1065d24f7dbc5b06be0044fc2c_mv2.png%20title=110c10_85136d1065d24f7dbc5b06be0044fc2c_mv2.png/ HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:26 -0500] "GET /site/assets/files/1018/12x12-logo_small.318x318.jpg%20alt=http://www.lakeplace.com/offices/shell-lake/dave-mcnulty/ HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:26 -0500] "GET /site/assets/files/1018/68748d_45fb6c8cc2dd431f8d458272529ddc5f_mv2-1-3_318x318.318x318.jpg%20alt=http://www.drydenwire.com/advertise// HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:26 -0500] "GET /site/assets/files/1018/business5.730x170.jpg%20alt= HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:26 -0500] "GET /site/assets/files/1018/dka.730x170.jpg%20alt=http://drydenwire.com/news/the-dan-king-agency/%20title=http://drydenwire.com/news/the-dan-king-agency// HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:26 -0500] "GET /site/assets/files/1018/oral_cancer1-1.350x350.jpg%20class=img-fluid%20title=greenvalleydentalcare.com.edit.officite.com/oral-health.html%20alt=greenvalleydentalcare.com.edit.officite.com/oral-health.html HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:26 -0500] "GET /site/assets/files/2372/dakota_mulroy.320x240.jpg%20title= HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:26 -0500] "GET /site/assets/files/2373/roost_logo_jpeg.320x240.jpg%20title= HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:26 -0500] "GET /site/assets/files/2376/sact-dfs.320x240.jpg%20title= HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:26 -0500] "GET /site/assets/files/2379/screen_shot_2017-04-18_at_2_18_05_pm.320x240.png%20title= HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:26 -0500] "GET /site/assets/files/2381/image00dd1_thumbnailimage-800-400-1-1_1.320x240.jpg%20title= HTTP/1.0" 404 36489 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 162.72.69.38 - - [19/Apr/2017:08:41:27 -0500] "POST /api/json-articles/ HTTP/1.0" 302 17097 "http://drydenwire.com/" "Mozilla/5.0 (iPad; CPU OS 10_3_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/57.0.2987.137 Mobile/14E304 Safari/602.1" 174.219.8.165 - - [19/Apr/2017:08:41:40 -0500] "GET /news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/ HTTP/1.0" 200 6091 "http://m.facebook.com" "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E304[FBAN/FBIOS;FBAV/88.1.0.64.70;FBBV/55330959;FBDV/iPhone6,1;FBMD/iPhone;FBSN/iOS;FBSV/10.3.1;FBSS/2;FBCR/Verizon;FBID/phone;FBLC/en_US;FBOP/5;FBRV/55506002]" 174.255.138.116 - - [19/Apr/2017:08:41:38 -0500] "GET /site/assets/files/1018/16427419_727170664155206_316199905395247334_n.350x350.png HTTP/1.0" 200 83637 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G36 [FBAN/FBIOS;FBAV/85.0.0.34.62;FBBV/53195005;FBDV/iPhone6,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.3.5;FBSS/2;FBCR/TFW;FBID/phone;FBLC/en_US;FBOP/5;FBRV/0]" 174.255.138.116 - - [19/Apr/2017:08:41:38 -0500] "GET /site/assets/files/1018/68748d_d5da25c6d4fa4f6d9706cd23b1ad0090_mv2_318x318_1.350x350.jpg HTTP/1.0" 200 17698 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G36 [FBAN/FBIOS;FBAV/85.0.0.34.62;FBBV/53195005;FBDV/iPhone6,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.3.5;FBSS/2;FBCR/TFW;FBID/phone;FBLC/en_US;FBOP/5;FBRV/0]" 174.255.138.116 - - [19/Apr/2017:08:41:38 -0500] "GET /site/assets/files/1018/68748d_f3877726651c43cdb583674290d3db34_mv2_318x318_1.350x350.jpg HTTP/1.0" 200 16279 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G36 [FBAN/FBIOS;FBAV/85.0.0.34.62;FBBV/53195005;FBDV/iPhone6,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.3.5;FBSS/2;FBCR/TFW;FBID/phone;FBLC/en_US;FBOP/5;FBRV/0]" 174.255.138.116 - - [19/Apr/2017:08:41:38 -0500] "GET /site/assets/files/1018/oral_cancer1-1.350x350.jpg HTTP/1.0" 200 22970 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G36 [FBAN/FBIOS;FBAV/85.0.0.34.62;FBBV/53195005;FBDV/iPhone6,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.3.5;FBSS/2;FBCR/TFW;FBID/phone;FBLC/en_US;FBOP/5;FBRV/0]" 174.255.138.116 - - [19/Apr/2017:08:41:38 -0500] "GET /site/assets/files/1018/screen_shot_2016-12-21_at_2_37_10_pm_318x318_1.350x350.png HTTP/1.0" 200 78702 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G36 [FBAN/FBIOS;FBAV/85.0.0.34.62;FBBV/53195005;FBDV/iPhone6,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.3.5;FBSS/2;FBCR/TFW;FBID/phone;FBLC/en_US;FBOP/5;FBRV/0]" 174.255.138.116 - - [19/Apr/2017:08:41:38 -0500] "GET /site/assets/files/2372/dakota_mulroy.75x75.jpg HTTP/1.0" 200 3262 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G36 [FBAN/FBIOS;FBAV/85.0.0.34.62;FBBV/53195005;FBDV/iPhone6,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.3.5;FBSS/2;FBCR/TFW;FBID/phone;FBLC/en_US;FBOP/5;FBRV/0]" 174.255.138.116 - - [19/Apr/2017:08:41:38 -0500] "GET /site/assets/files/2380/tyler-milton-drydenwire_thumbnailImage-800-400-1-1.jpg HTTP/1.0" 200 64480 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G36 [FBAN/FBIOS;FBAV/85.0.0.34.62;FBBV/53195005;FBDV/iPhone6,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.3.5;FBSS/2;FBCR/TFW;FBID/phone;FBLC/en_US;FBOP/5;FBRV/0]" 174.255.138.116 - - [19/Apr/2017:08:41:38 -0500] "GET /site/assets/files/2380/tyler-milton-drydenwire-1.jpg HTTP/1.0" 200 463645 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G36 [FBAN/FBIOS;FBAV/85.0.0.34.62;FBBV/53195005;FBDV/iPhone6,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.3.5;FBSS/2;FBCR/TFW;FBID/phone;FBLC/en_US;FBOP/5;FBRV/0]" 174.255.138.116 - - [19/Apr/2017:08:41:39 -0500] "GET /site/assets/files/2375/sean-duffy.75x75.png HTTP/1.0" 200 10264 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G36 [FBAN/FBIOS;FBAV/85.0.0.34.62;FBBV/53195005;FBDV/iPhone6,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.3.5;FBSS/2;FBCR/TFW;FBID/phone;FBLC/en_US;FBOP/5;FBRV/0]" 174.255.138.116 - - [19/Apr/2017:08:41:39 -0500] "GET /site/assets/files/2380/tyler-milton-drydenwire.75x75.jpg HTTP/1.0" 200 3914 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G36 [FBAN/FBIOS;FBAV/85.0.0.34.62;FBBV/53195005;FBDV/iPhone6,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.3.5;FBSS/2;FBCR/TFW;FBID/phone;FBLC/en_US;FBOP/5;FBRV/0]" 174.255.200.17 - - [19/Apr/2017:08:41:34 -0500] "GET /site/assets/files/1018/68748d_45fb6c8cc2dd431f8d458272529ddc5f_mv2-1-3_318x318.318x318.jpg HTTP/1.0" 200 23365 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (Linux; Android 5.1.1; A571VL Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/112.0.0.20.70;]" 174.255.200.17 - - [19/Apr/2017:08:41:36 -0500] "GET /site/assets/files/1018/68748d_d5da25c6d4fa4f6d9706cd23b1ad0090_mv2.318x318.jpg HTTP/1.0" 200 23913 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (Linux; Android 5.1.1; A571VL Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/112.0.0.20.70;]" 174.255.200.17 - - [19/Apr/2017:08:41:40 -0500] "GET /site/assets/files/1018/68748d_f3877726651c43cdb583674290d3db34_mv2.318x318.jpg HTTP/1.0" 200 20575 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (Linux; Android 5.1.1; A571VL Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/112.0.0.20.70;]" 174.255.200.17 - - [19/Apr/2017:08:41:41 -0500] "GET /site/assets/files/1018/110c10_a5c4dfdb9fdf4e8fbc9c8432622f7132_mv2.125x125.png HTTP/1.0" 200 22570 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (Linux; Android 5.1.1; A571VL Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/112.0.0.20.70;]" 174.255.200.17 - - [19/Apr/2017:08:41:41 -0500] "GET /site/assets/files/1018/17201224_1314142275320656_1582408838009383145_n-2.318x318.jpg HTTP/1.0" 200 45937 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (Linux; Android 5.1.1; A571VL Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/112.0.0.20.70;]" 174.255.200.17 - - [19/Apr/2017:08:41:41 -0500] "GET /site/assets/files/1018/68748d_0ea114e791db455fb6605ab23b862dd5_mv2.318x318.jpg HTTP/1.0" 200 33057 "http://drydenwire.com/news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/" "Mozilla/5.0 (Linux; Android 5.1.1; A571VL Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/56.0.2924.87 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/112.0.0.20.70;]" 184.158.34.180 - - [19/Apr/2017:08:41:35 -0500] "GET /api/json-news HTTP/1.0" 200 - "http://drydenwire.com/" "Mozilla/5.0 (Linux; Android 4.4.4; SM-S820L Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36" 184.158.34.180 - - [19/Apr/2017:08:41:35 -0500] "GET /api/json-news/ HTTP/1.0" 301 - "http://drydenwire.com/" "Mozilla/5.0 (Linux; Android 4.4.4; SM-S820L Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36" 184.158.34.180 - - [19/Apr/2017:08:41:35 -0500] "POST /api/json-articles/ HTTP/1.0" 302 17097 "http://drydenwire.com/" "Mozilla/5.0 (Linux; Android 4.4.4; SM-S820L Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36" 24.178.47.197 - - [19/Apr/2017:08:41:38 -0500] "GET /news/shell-lake-man-charged-with-2nd-degree-sexual-assault-of-a-child/ HTTP/1.0" 200 6091 "http://m.facebook.com" "Mozilla/5.0 (iPad; CPU OS 10_1_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Mobile/14B100 [FBAN/FBIOS;FBAV/88.1.0.64.70;FBBV/55330959;FBDV/iPad4,2;FBMD/iPad;FBSN/iOS;FBSV/10.1.1;FBSS/2;FBCR/U.S.Cellular;FBID/tablet;FBLC/en_US;FBOP/5;FBRV/0]" 68.190.149.70 - - [19/Apr/2017:08:41:36 -0500] "GET /news/jury-trial-scheduled-for-man-charged-with-auto-theft-in-washburn-county/ HTTP/1.0" 200 5737 "http://m.facebook.com/" "Mozilla/5.0 (Linux; Android 7.0; SAMSUNG-SM-G930A Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/119.0.0.23.70;]" *** ISSUE ENDS ***
  11. I would like to say "Thank You" to each of you for responding to my post. I am a novice part-time developer (I am a full-time pastor) and love PW. This has been a great learning experience. I took the advice of several of you and installed a logging module. I was going to go with the profilerpro module but found the tracy debugger and thought I would give it a go. The logging is fantastic thus far. Below is what I found during another "blackout" DATE/TIME USER URL TEXT 33 seconds ago 2017-04-18 14:11:29 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 34 seconds ago 2017-04-18 14:11:28 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 35 seconds ago 2017-04-18 14:11:27 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 36 seconds ago 2017-04-18 14:11:26 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 37 seconds ago 2017-04-18 14:11:25 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 38 seconds ago 2017-04-18 14:11:24 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 39 seconds ago 2017-04-18 14:11:23 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 40 seconds ago 2017-04-18 14:11:22 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 42 seconds ago 2017-04-18 14:11:20 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 3 minutes ago 2017-04-18 14:09:11 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 3 minutes ago 2017-04-18 14:09:10 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 3 minutes ago 2017-04-18 14:09:09 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 3 minutes ago 2017-04-18 14:09:08 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) 3 minutes ago 2017-04-18 14:09:07 - ? SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireDatabasePDO.php line 390) Which has sent me on a chase regarding that error. It seems to be the wait_timeout or max_allowed_packet variables need to be configured to allow for higher amounts of data. Now, this obviously does not solve what is causing the variables to exceed their size limitations, but it is a start. My question now is, what is the significance of the "?" ? It's as if no page was being requested. I will keep Googling and awaiting replies. In the meantime I will take the following suggestions from the community: 1. I will take a closer look at the profiler pro module 2. I will limit my search functionality to make sure that isn't the cause 3. I believe the cacheing issue was because in a last-ditch-effort I turned on the Google Pagespeed Apache module, which does some goofy stuff I don't understand. I already use ProCache so to eliminate variables and slim down my code-funk I turned off Google Pagespeed and that could get the cacheing working properly again. 4. DaveP I don't fully understand the question, but I DO have several images being resized. Although, I believe I have correctly set things up to only resize on the SAVE of the template instance, not dynamically on a page load. So I don't THINK that is the problem, although I am swimming in deep waters here.
  12. Hello, I am truly stuck. I have a website I built for a client that has become quite successful: http://drydenwire.com It is an independent news agency. The problem is, I built everything from scratch in Processwire and things were purring along until the traffic went up. Now, I keep getting these huge spikes which last about 15 seconds and cause all users to receive a 503 Error. I have created a public repo for review: https://github.com/scramlo/DrydenWire.com/tree/master and can answer any questions that may lead to an answer. I am willing to hire a more experienced developer if the community is unable to help me mine out this issue. I have gone through the usage logs and know that all traffic is legitimate, I am not getting bombarded by a spam IP address or anything like that. Thank you for any and all assistance as this client is getting frustrated and I would rather not lose them!!! -Brian
×
×
  • Create New...