Jump to content

Recommended Posts

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

Screen Shot 2017-04-14 at 10.39.25 PM.png

Screen Shot 2017-04-14 at 10.39.53 PM.png

 

Link to comment
Share on other sites

Welcome Brian,

There is a pro module you might be interested in that is designed for tracking performance and identifying bottlenecks: Profiler Pro

There's more info about it in the blog post that introduced it: https://processwire.com/blog/posts/a-look-at-the-new-profilerpro-module/

And with purchase comes support from the man himself. Ryan says:

Quote

I often find myself in the position of helping people locate and fix bottlenecks on websites and applications, and this tool is something I've always wished I had. While ProfilerPro is a tool to identify issues, the support board is dedicated to helping users analyze, fix and optimize performance issues. When you purchase ProfilerPro, you are purchasing a helpful support service with the ProcessWire core developer to help you use the tool and isolate and resolve bottlenecks.

Might be a fast way to resolve the problem.

  • Like 4
Link to comment
Share on other sites

While you say that it's legitimate traffic, what kind of traffic is it? What I'm wondering is what exactly happens during that spike: are there more requests to a specific feature than usual, etc.?

While a code review could definitely result in some ideas about what to optimise, usually the best and first thing you should do is properly analyse the data you have, i.e. your log files. Find out any abnormalities in the requests, see which requests were particularly slow (you should get this data from the web server logs), and see if the MySQL slow query log (if you have it enabled) contains any additional clues.

As an example, one site I help maintain recently got a lot of heavy traffic all of a sudden. Turns out it was a result of a campaign where each request included a similar GET param, and that in turn made the site skip cache. Note that I'm not saying that this has anything to do with your specific case; it's just something I couldn't tell from the amount of traffic alone, but it was really obvious once I took a closer look at Apache logs :)

On a related note, it could also be that this has nothing to do with the code itself. It could simply be that your server -- or server configuration -- is the bottleneck. That too could be a result of an increase in a specific type of request, so again taking a closer look at the logs is where I'd start from.

Edit: It seems that you're running an nginx reverse proxy in front of your site, but for every request I get a response header X-Proxy-Cache: MISS. Doesn't seem that this proxy is doing it's job too well if none of the requests are served from the cache. I'm not an expert on this particular topic, but in my opinion there's something fishy about your setup :)

  • Like 5
Link to comment
Share on other sites

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.

  • Like 2
Link to comment
Share on other sites

Sorry for not being clearer. What I was trying to say was that if, say, you imported a news feed from an outside source at a specific time, or it was updated and new items added all at once, and all of a sudden you had several images being resized for use on the front page, then that might make for a bottleneck.

Whatever is causing the issue, let's try to dig a bit deeper. Would I be right in thinking that you are on the Legacy branch (2.8.n) of PW? That's the one where line 390 of /wire/core/WireDatabasePDO.php looks likeliest to trigger an error. It shouldn't make a difference, but you never know.

Do you have (or could you ask for) access to the mySQL slow query log? It might not help, but it's another thing to eliminate, especially now that we are looking to resolve a mySQL timeout error that the logs you've posted point to.

Depending on your hosting setup, it might not even be your site that is the root of the problem - someone else might be borking the db server for you and you see the symptoms!

  • Like 1
Link to comment
Share on other sites

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 ***

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Edited by Brian Scramlin
Link to comment
Share on other sites

Hello Brian.

Just saw only two files and here are small suggestions for better practice ( pages->find inside foreach and count inside for loops).

insider-home.php

// line 2.
foreach ($pages->find("articleInsider=1") as $article){
...
}

better is this:

$articles = $pages->find("articleInsider=1");
foreach ($articles as $article){
...
}

or

article.php

// 46. line
for ($i=0; $i < count($titleArr); $i++) {
    ...
}

to this

$c = count($titleArr);
for ($i=0; $i < $c; $i++) {
   ....
}

It's not problem if do this inside if statement eg. if( count($pages->find...) > 1 ).

Regards.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...