Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 28. Nov 2024, 09:14

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: 11. Jan 2008, 21:53 
Offline

Joined: 27. Jul 2007, 20:28
Posts: 136
Code:


[root@gator287 /public_html/rule34]# chmod 000 image.php
[root@gator287 /public_html/rule34]# chown root:root
 image.php

[root@gator287 ~]# ps aux
13457  0.4  0.4 30724 19784 ?       SN   13:13   0:00
 /usr/bin/php image.php
13660  0.2  0.1 18632 7536 ?        SN   13:13   0:00
 /usr/bin/php image.php
13891  0.3  0.1 18552 7532 ?        SN   13:13   0:00
 /usr/bin/php image.php
13922  0.4  0.1 18576 7532 ?        SN   13:13   0:00
 /usr/bin/php image.php
14001  0.5  0.1 18560 7536 ?        SN   13:13   0:00
 /usr/bin/php image.php
14062  0.7  0.1 18516 7544 ?        SN   13:13   0:00
 /usr/bin/php image.php
14119 11.3  0.9 51324 40392 ?       SN   13:13   0:00
 /usr/bin/php image.php
14153  1.0  0.1 18572 7532 ?        SN   13:13   0:00
 /usr/bin/php image.php
14194  3.0  0.1 18556 7536 ?        SN   13:13   0:00
 /usr/bin/php image.php
14218  3.0  0.1 18588 7540 ?        SN   13:13   0:00
 /usr/bin/php image.php
14222  6.0  0.3 24412 13376 ?       RN   13:13   0:00
 /usr/bin/php image.php


Any ideas what might be causing the excessive load? or should I just read through the optimization, and turn off a few more things?


Top
 Profile  
 
 Post subject:
PostPosted: 11. Jan 2008, 23:53 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
image.php is always called if an image is not found in the cache and has to be generated
e.g. when the thumbnails of a folder are generated the first time.

I can only say more if I can see the whole request.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 12. Jan 2008, 01:27 
Offline

Joined: 27. Jul 2007, 20:28
Posts: 136
TinyWebGallery wrote:
image.php is always called if an image is not found in the cache and has to be generated
e.g. when the thumbnails of a folder are generated the first time.

I can only say more if I can see the whole request.

/Michael


Aye, but all the images for the gallery look to of already been generated prior. I think the excessive load is due to there being flat out too many people accessing too many images.

I'm wondering if possibly uploading 5 separate instances of twg one for each category, would off set the number of requests, and make it so that it would settle the bog down a little?


Top
 Profile  
 
 Post subject:
PostPosted: 12. Jan 2008, 01:34 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
not really.

Can you give me more detail about the requests?
then I can tell you where to optimize ...

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 12. Jan 2008, 01:39 
Offline

Joined: 27. Jul 2007, 20:28
Posts: 136
TinyWebGallery wrote:
not really.

Can you give me more detail about the requests?
then I can tell you where to optimize ...

/Michael


I just emailed asking about it. From what I was told, it was due to the sheer number of requests being processed through the file that was causing the bog down.


Top
 Profile  
 
 Post subject:
PostPosted: 12. Jan 2008, 01:46 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
You can install Firebug.

I used it on your site to show what TWG is sending and how often image.php is called.

Try it by yourself. During normal browsing it's only called for the Ajax stuff. This only once per page.

I noticed an error if the Ajax requests on your site actually.
You see this when you try to navigate with the moving thumbstrip!

Seems something is missing on your install:

01.11.2008 10:32:56 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 69: Undefined variable: type
01.11.2008 10:32:57 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 62: Undefined variable: type
01.11.2008 10:32:57 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 62: Undefined variable: type
01.11.2008 10:32:57 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 67: Undefined variable: dataXmlHttp
01.11.2008 10:32:57 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 67: Undefined variable: browserXmlHttp
01.11.2008 10:32:57 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 67: Undefined variable: browserNoJS
01.11.2008 10:32:57 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 67: Undefined variable: precachexml
01.11.2008 10:32:57 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 67: Undefined variable: menuXmlHttp
01.11.2008 10:32:57 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 67: Undefined variable: menuXmlAutohide
01.11.2008 10:32:57 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 69: Undefined variable: type
01.11.2008 11:28:06 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 62: Undefined variable: type
01.11.2008 11:28:06 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 62: Undefined variable: type
01.11.2008 11:28:06 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 67: Undefined variable: dataXmlHttp
01.11.2008 11:28:06 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 67: Undefined variable: browserXmlHttp
01.11.2008 11:28:06 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 67: Undefined variable: browserNoJS
01.11.2008 11:28:06 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 67: Undefined variable: precachexml
01.11.2008 11:28:06 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 67: Undefined variable: menuXmlHttp
01.11.2008 11:28:06 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 67: Undefined variable: menuXmlAutohide
01.11.2008 11:28:06 - ERROR 8 in /home/kaze/public_html/rule34/image.php, line 69: Undefined variable: type

Check if the /inc/parserequestimage.inc.php is uploaded properly!

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 12. Jan 2008, 01:49 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
but you tell they have disabled image.php - This can be the reason for the error.

You can go to my demo - there you see how often image.php ist called.
Not very often actually. once or twice per page.

Maybe something else is calling the image.php - Therefore it would be interesting about the whole requests.

Maybe some robot is producing the load!
Then you should exclude robots to scan your site.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 12. Jan 2008, 01:55 
Offline

Joined: 27. Jul 2007, 20:28
Posts: 136
I reuploaded the parserequestimage.inc.php as found in /twg162

filesizes are exact, so it hasn't been modified since the upload. It might possibly be the robots, so I guess I'll have to disable them with the .txt file.


Top
 Profile  
 
 Post subject:
PostPosted: 12. Jan 2008, 02:07 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
In the log you sent me before not parameters are shown.
I don't know it this is really the case or if your admins have stripped them off.

Because if there are no parameters then the file is for sure not called by TWG .
I always send a parameter!

If you call it without parameters then actually only php ist started. Some files are loaded but nothing else.
But if you call it extemely often this can for sure kill a server.

I think I can add a detection of the number of the parameters as first step. Then at least the other files are not included for nothing.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 12. Jan 2008, 02:15 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I have added

if (count($_GET) == 0) {
echo "Parameters needed";
exit;
}

at the very top if image.php.

This does now enables that direct calls of the image.php without parameters don't use many resources.

A better solution would be to block calls to image.php without parameters.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 12. Jan 2008, 02:25 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
please try to get the logs from your hoster - this is the most interesting thin if the image.php was called without any parameters.

Optimal solution would be to have a .htaccess that only allows to access the file if parameters do exists. But I don't work much with .htaccess.
Maybe your hoster knows ;).

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 14. Jan 2008, 17:53 
Offline

Joined: 27. Jul 2007, 20:28
Posts: 136
Is this what you're looking for?

Code:
I'm seeing alot of these requests here;

12831 R rule34.of-the-intern  -0.00%  1174.71s GET
 /cache/1_Rule%2B34_br549232
  6004 R rule34.of-the-intern  -0.00%  1761.80s GET
 /buttons/menu_last_over.gif
 12341 R rule34.of-the-intern  -0.00%  1173.54s GET
 /cache/1_Rule%2B34_br549232
  4592 R rule34.of-the-intern  -0.00%  1759.15s GET
 /cache/1_Rule%2B34_br549232
 12296 R rule34.of-the-intern  -0.00%  1164.96s GET
 /cache/1_Rule%2B34_br549232
  6357 R rule34.of-the-intern  -0.00%  1742.36s GET
 /cache/1_Rule%2B34_br549232
  9782 R rule34.of-the-intern  -0.00%  1441.43s GET
 /cache/1_Rule%2B34_br549232
  9806 R rule34.of-the-intern  -0.00%  1436.89s GET /favicon.ico
 HTTP/1.1
 10222 R rule34.of-the-intern  -0.00%  1435.71s GET /framestyle.css
 HTTP/1.1
 10057 R rule34.of-the-intern  -0.00%  1433.83s GET
 /buttons/guzs_normal.gif HT
  9730 R rule34.of-the-intern  -0.00%  1433.02s GET
 /cache/1_Rule%2B34_br549232
 10076 R rule34.of-the-intern  -0.00%  1429.54s GET /buttons/nbw.gif
 HTTP/1.1
 10116 R rule34.of-the-intern  -0.00%  1400.10s GET
 /cache/1_Rule%2B34_br549232
  6368 R rule34.of-the-intern  -0.00%  1674.54s GET
 /cache/1_Rule%2B34_br549232
  5120 R rule34.of-the-intern  -0.00%  1674.00s GET
 /cache/1_Rule%2B34_br549232
  6701 R rule34.of-the-intern  -0.00%  1673.34s GET
 /cache/1_Rule%2B34_br549232
  6380 R rule34.of-the-intern  -0.00%  1670.71s GET
 /cache/1_Rule%2B34_br549232
  9522 R rule34.of-the-intern  -0.00%  1391.65s GET
 /cache/1_Rule%2B34_br549232
  6934 R rule34.of-the-intern  -0.00%  1666.61s GET
 /image.php?browserx=1003&br
 10905 R rule34.of-the-intern  -0.00%  1376.00s GET
 /cache/1_Rule%2B34_br549232
  6381 R rule34.of-the-intern  -0.00%  1649.24s GET
 /cache/1_Rule%2B34_br549232
 10227 R rule34.of-the-intern  -0.00%  1373.23s GET
 /cache/1_Rule%2B34_br549232
  7965 R rule34.of-the-intern  -0.00%  1636.79s GET
 /cache/1_Rule%2B34_br549232
  8164 R rule34.of-the-intern  -0.00%  1635.99s GET
 /cache/1_Rule%2B34_br549232
  3911 R rule34.of-the-intern  -0.00%  1892.60s GET
 /cache/1_Rule%2B34_br549232
  3886 R rule34.of-the-intern  -0.00%  1878.29s GET
 /cache/1_Rule%2B34_br549232
  3418 R rule34.of-the-intern  -0.00%  1878.01s GET
 /cache/1_Rule%2B34_br549232
  8060 R rule34.of-the-intern  -0.00%  1603.75s GET
 /cache/1_Rule%2B34_br549232
 11242 R rule34.of-the-intern  -0.00%  1329.09s GET
 /index.php?twg_album=1_Rule
 10214 R rule34.of-the-intern  -0.00%  1326.67s GET
 /cache/1_Rule%2B34_br549232
 11233 R rule34.of-the-intern  -0.00%  1325.91s GET
 /cache/1_Rule%2B34_br549232
 10918 R rule34.of-the-intern  -0.00%  1325.51s GET
 /image.php?browserx=989&bro
  5075 R rule34.of-the-intern  -0.00%  1324.05s GET
 /cache/1_Rule%2B34_br549232
  3703 R rule34.of-the-intern  -0.00%  1842.54s GET
 /cache/1_Rule%2B34_br549232
 11669 R rule34.of-the-intern  -0.00%  1312.74s GET
 /cache/1_Rule%2B34_br549232
 11650 R rule34.of-the-intern  -0.00%  1311.24s GET
 /image.php?browserx=1003&br
  8765 R rule34.of-the-intern  -0.00%  1556.29s GET
 /cache/1_Rule%2B34_br549232
  8550 R rule34.of-the-intern  -0.00%  1547.07s GET
 /cache/1_Rule%2B34_br549232
  5163 R rule34.of-the-intern  -0.00%  1802.67s GET
 /language/language_de.gif H
  9295 R rule34.of-the-intern  -0.00%  1530.78s GET
 /cache/1_Rule%2B34_br549232
  3969 R rule34.of-the-intern  -0.00%  1785.46s GET
 /cache/1_Rule%2B34_br549232
  3287 R rule34.of-the-intern  -0.00%  1784.63s GET
 /cache/1_Rule%2B34_br549232
  8562 R rule34.of-the-intern  -0.00%  1526.35s GET
 /cache/1_Rule%2B34_br549232
  3456 R rule34.of-the-intern  -0.00%  1780.02s GET
 /cache/1_Rule%2B34_br549232
 12342 R rule34.of-the-intern  -0.00%  1015.13s GET
 /cache/1_Rule+34_br54923267
  8469 R rule34.of-the-intern  -0.00%  1522.64s GET
 /cache/1_Rule%2B34_br549232
  3465 R rule34.of-the-intern  -0.00%  1774.33s GET /buttons/s00.gif
 HTTP/1.0
  4603 R rule34.of-the-intern  -0.00%  1770.45s GET
 /image.php?browserx=989&bro
  9203 R rule34.of-the-intern  -0.00%  1514.49s GET
 /cache/1_Rule%2B34_br549232
  9092 R rule34.of-the-intern  -0.00%  1513.05s GET
 /cache/1_Rule%2B34_br549232
  9079 R rule34.of-the-intern  -0.00%  1507.30s GET
 /cache/1_Rule%2B34_br549232
  9438 R rule34.of-the-intern  -0.00%  1496.65s GET
 /cache/1_Rule%2B34_br549232


Top
 Profile  
 
 Post subject:
PostPosted: 14. Jan 2008, 18:01 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
kind of - there are only the first couple of chars of each call is shown.

As you see image.php is not called very often

only like:
/image.php?browserx=989&bro

And this this the browser resulution I send to the server every 2nd click.

Most of the requests are images from the cache (starting with /cache ....).

This seems to be a current log.
More interesting would be the log which they used to tell you that too much cpu is used.

The log you pasted below is completely fine!

Ask your hoster to allow image.php again because as they see from the log there is no extensive use of this!

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 14. Jan 2008, 18:52 
Offline

Joined: 27. Jul 2007, 20:28
Posts: 136
hmm, you think I could cut it down if I disabled access to /cache for the robots.txt file?

I could probably set .htaccess, or chmod to image.php to only allow server access.

Another possibility I think of, is that when the image is copied, image.php is also copied as the img src, making something like

Code:
<img src="http://domain.com/image.php?twg_album=demo&amp;twg_show=file.jpg">



Is this necessary?


Top
 Profile  
 
 Post subject:
PostPosted: 14. Jan 2008, 19:11 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
This does not help at all.

image.php is only generating load when generating images.

image.php is also used for ajax calls - but there it only reads xml files and returns this data.

This is only done once and then the image is stored in the cache.
Images from the cache do not generate cpu load - they only need bandwidth for the transfer.

If you want to minimize the use of image.php.

Disable maximized view and the maximized slideshow. Using the normal slideshow is optimal.

I might put the ajax calls to a different file. Then the load is distributed a little bit better.

/Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy