IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1982.48 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-07-12
Pages: < Prev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Next >
[16:16]<tjufgg>You can't iterate over a mysql result
[16:16]<awl>Anyone please ? Fast question fast answer :)
[16:17]<ar2>ok
[16:17]<ar2>but
[16:17]<ar2>my result is from ADODB
[16:17]<cyzzzg>jgb: what would $k be..?
[16:17]<vjfus>Meltir, Touqen : could this indicate a lack of memory in mysql? or bad queries? I have a suspicious that php is hanging at 10% instead ending really fast because it's waiting for mysql
[16:17]<tjufgg>jgb: Oh.
[16:18]<tjufgg>In that case it might be iterable, what does the adodb manual say?
[16:18]<ar2>yes, but I don't completely get what it does
[16:18]<tjufgg>Volus: Or it could just be that querying and drawing graphs is cpu-intensive..
[16:18]<cslrd>hrm... i just found a quite serious error with o2.co.uk. slightly off topic, but it seems a "billing session ID" is being stored and not destroyed. If another user logs on, the previous billing session id is used, and the previous users bill is displayed!
[16:18]<ar2>Ciaran: foreach($a as $key -> $value) ?
[16:19]<tjufgg>jgb: What don't you completely get?
[16:19]<bxnrd>Touqen: anyhow to go into specifics; I'm using a function called AVIFileOpen(). Then there's this thing that's called a frameserver which emulates an avi codec so when opening a certain file, data is read from a server instead of the file. running this through webserver; a) opening a regular .avi file works b) opening a frameserver avi file DOESNT. Running from commandline, both work.
[16:19]<cyzzzg>jgb: ??
[16:19]<ar2>Touqen : what is going on in the recordset.
[16:19]<ar2>Ciaran: you asked what $k was
[16:20]<mnfvyz>Volus: personal experience - sometimes the connection to mysql isnt closed. if mysql is overloaded the php process or apache then hangs trying to make new connections (one that give anwsers) thus causing the effect to get worse. sometimes this settles down after an hour or two when the non responsive mysql processes timeout.
[16:20]<tjufgg>jgb: What do you mean by what goes on in the record set?
[16:20]<vjfus>touqen : nah, the graphs aren't done by mysql, this is primarily caused by very quick page loads, at like 1-5/sec on a given site.. it's fine.. load is like .02, but when getting like 10/15 pages/sec.. everything skyrockets, php scripts sit at 10% CPU for several seconds
[16:20]<cyzzzg>jgb: I did..so what is it?
[16:21]<tjufgg>Volus: Maybe you could try caching...
[16:21]<vjfus>Meltir: so what would you suggest, faster timeouts for mysql/php ? More memory for query caching?
[16:21]<ar2>Touqen : apologies for my wording. what is returned when I iterate over the set, ie. what is returned as the key/value
[16:22]<ar2>Ciaran: whatever is returned as the key, which I don't know
[16:22]<vjfus>Touqen: mysql does a lot of internal caching, you mean caching the scripts, or caching the generated pages with a proxy or something?
[16:22]<tjufgg>jgb: Does the adodb manual say that the adodb resultset is interable? And if so it should say what gets returned.
[16:22]<tjufgg>Volus: caching the generated pages
[16:23]<ar2>Foreach iterators: This is a very natural way of going through a recordset: $ADODB_FETCH_MODE = ADODB_FETCH_NUM;$ADODB_FETCH_MODE = ADODB_FETCH_NUM; $rs = $db->Execute($sql); oreach($rs as $k => $row) { echo "r1=".$row[0]." r2=".$row[1]."<br>"; }
[16:23]<ar2>that's it
[16:24]<vjfus>touqen : that's probably a good idea, I was gonna try eaccelerator, just to see if i could cut back on php CPU usage, and then look into some kind of page cache, I have hell of a lot of pages though. Some of them I want to update no matter what, like when a user puts in info, I want them to see it on the site immediately, is this possible?
[16:24]<tjufgg>Volus: Depends on the caching system you use. If you roll your own then you can control which pages get cached.
[16:24]<tjufgg>I think your problem simply stems from the load.
[16:25]<tjufgg>It's probably just overwhelming apache/mysql.
[16:25]<vjfus>touqen : yea, that and using php as CGI i think, but I'm not really happy about giving up the chroot that I can do with it this way
[16:25]<tjufgg>jgb: It returns a row.
[16:25]<tjufgg>I don't see wher ethe confusion is.
[16:26]<vjfus>mysql doesn't report any slow queries, but I'm sure my scripts are not exactly efficient either
[16:26]<tjufgg>I doubt that using cgi is that much of a performance hit.
[16:26]<snzvxnz>Touqen: what is your average total time it takes to generate the pages?
[16:26]<tjufgg>seather: ?
[16:27]<tjufgg>That kind of came out of left field.
[16:27]<snzvxnz>oh, wrong person?
[16:27]<vjfus>touqen : you think? It seems like it, I have to make 15M available to every process just to get the script to run, it has to load that php binary for every script, I guess it caches it, but still...
[16:27]<snzvxnz>Volus: ?
[16:28]<snzvxnz>we cache "calculated values" on our software
[16:28]<pjffyvr>arrr
[16:28]<snzvxnz>it helps bringing it down a lot
[16:28]<pjffyvr>avast mateys
[16:28]<tjufgg>Volus: Why does you r script use 15M of memory?
[16:29]<snzvxnz>we have an entire "$environment['cache'" global
[16:29]<snzvxnz>array to store all the stuff
[16:29]<vjfus>seather: ahh, umm.. i don't count the template load times, but I do count the bulk of the scipt, usually 0.010 or 0.004
[16:29]<snzvxnz>Volus: that's not very slow
[16:30]<vjfus>Touqen: well, suexec calls the php binary which runs the script, you can limit mem in suexec, but anything below 10-15.. script won't run, because php takes that much to load up
[16:30]<vjfus>seather: yea.. it's not, it's just when it gets hammered, CPU spikes.. it can lock up the whole box
[16:30]<vjfus>or at least lag it to slower than death
[16:31]<snzvxnz>oooh ouch
[16:31]<snzvxnz>we had a load issue on our hosting server, so we separated sql/web and mail software onto separate servers
[16:31]<tjufgg>Hmm.. I have nothing to do and my boss just called out sick :/
[16:31]<snzvxnz>the sql/web split helped a lot
[16:32]<cyzzzg>Christ making a PEAR account is a nightmare
[16:32]<snzvxnz>lol
[16:32]<jznj>seather: but wouldn't it take more time now, since it has to go through the network for queries?
[16:32]<snzvxnz>oreo: actually not, it
[16:32]<tjufgg>Volus: First, try caching your generated pages and reduce the number of connections going to mysql
[16:32]<snzvxnz>'s faster
[16:32]<tjufgg>And see what happens.
[16:32]<jznj>seather: hmm that's interesting. and i suppose they're all on the same switch
[16:32]<zsmzu2zfnw>hello
[16:33]<snzvxnz>oreo: actually they're on a gigabit-copper-crossover :)
[16:33]<tjufgg>oreo: and that explains the speed
[16:33]<jznj>crossover?
[16:33]<vjfus>touqen : will do, I'll have to research that.. coz i'm not sure what should do the caching, php, or something like a proxy in front of apache
[16:33]<jznj>so mail<-->web<-->sql ?
[16:33]<vjfus>seather: yea.. separate servers would ROCK
[16:33]<snzvxnz>no switch, network link is from one server to the other directly
[16:33]<jznj>with 3 NICs on web?
[16:34]<vjfus>seather: esp if you had like a cluster running fastcgi.. hehe
[16:34]<vjfus>seather: just separate the php from apache all together, maybe with an NFS backend?
[16:34]<snzvxnz>Volus: hate nfs
[16:34]<vjfus>that would be pretty awesome, if it worked
[16:34]<tjufgg>heh
[16:34]<tjufgg>nfs is nothing but overhead
[16:34]<snzvxnz>oreo: yes sort of like that :)
[16:34]<vjfus>seather: how else would you do a cluster tho :)
[16:34]<jznj>Volus: php on a load balancing server
[16:35]<vjfus>how do all your various servers access the files they need.. say if you had a cluster of apache servers
[16:35]<jznj>that server would be the "router". it's redirect traffic to the chosen server
[16:35]<tjufgg>Volus: In the case of web servers they could each have their own local copies of the static files.
[16:35]<jznj>Volus: you use something else than nfs
[16:35]<pjffyvr>oreo: load balancer
[16:35]<jznj>hi sara!
[16:35]<pjffyvr>oh, wait, you did use that term
[16:35]<pjffyvr>n/m
[16:35]<jznj>;)
[16:36]<vjfus>touqen : so if I'm the user, and I upload.. it just propagates across? or am I assigned to a specific server?
[16:36]<snzvxnz>or apache/php, fill it with ram, for SQL server, run scsi drives







