473,788 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Complicated search locks up MySQL on OpenBSD

I have an OpenBSD 3.3 system running MySQL 3.23.55 from the ports
tree. Everything started out at the default settings. This system
holds a large vBulletin 2.2.9 forum database, and that's pretty much
the only application that uses any resources.

Everything works fine, except that when the forum administrators do an
IP search, the database locks up and won't respond to any more queries
until it gives up on that search or is restarted. The actual query
that causes the problem is:

SELECT DISTINCT user.userid,use r.username
FROM post,user
WHERE user.userid=pos t.userid
AND post.ipaddress LIKE '192.168.1.2%'
AND user.userid<>0
ORDER BY user.username

For example. The 'user' table has 14800 records, and the 'post' table
has 403000, so I realize this search could take a while, but I don't
see why it's preventing any other queries from getting through.

When it gives up, it eventually complains about a missing file
descriptor, which made me think it was running out of file
descriptors. So I increased the mysql user's open files limit to
1024, and kern.maxfiles to 8192. That doesn't seem to make any
difference, though, and if I do 'mysqladmin extended-status' while the
server is hanging on that query, it only reports around 60-70 open
tables and 120 or so open files.

Any suggestions of other mysql variables I should tweak, or known
issues with MySQL on OpenBSD that could cause this? This same
database was recently working fine on Linux, and a few months ago was
running on a FreeBSD system with the same hardware, so there must be
something about my setup or the way it was compiled from ports that's
causing the problem.
Thanks,
--
Aaron
ab******@esc.pi ke.il.us
Jul 19 '05 #1
4 2467
Aaron Baugher wrote:
When it gives up, it eventually complains about a missing file
descriptor, which made me think it was running out of file
descriptors. So I increased the mysql user's open files limit to


I really don't know about OpenBSD, but at FreeBSD there was a bug with
realpath() function which caused similar problems. See, for example, here:
http://jeremy.zawodny.com/blog/archives/000697.html

--
--
Every sufficiently advanced magic is indistinguishab le from technology
- Arthur C Anticlarke
Jul 19 '05 #2
Aaron Baugher wrote:
When it gives up, it eventually complains about a missing file
descriptor, which made me think it was running out of file
descriptors. So I increased the mysql user's open files limit to


I really don't know about OpenBSD, but at FreeBSD there was a bug with
realpath() function which caused similar problems. See, for example, here:
http://jeremy.zawodny.com/blog/archives/000697.html

--
--
Every sufficiently advanced magic is indistinguishab le from technology
- Arthur C Anticlarke
Jul 19 '05 #3
In message <86************ @cail.baugher.p ike.il.us>, Aaron Baugher
<ab******@esc.p ike.il.us> writes
I have an OpenBSD 3.3 system running MySQL 3.23.55 from the ports
tree. Everything started out at the default settings. This system
holds a large vBulletin 2.2.9 forum database, and that's pretty much
the only application that uses any resources.

Everything works fine, except that when the forum administrators do an
IP search, the database locks up and won't respond to any more queries
until it gives up on that search or is restarted. The actual query
that causes the problem is:

SELECT DISTINCT user.userid,use r.username
FROM post,user
WHERE user.userid=pos t.userid
AND post.ipaddress LIKE '192.168.1.2%'
AND user.userid<>0
ORDER BY user.username

For example. The 'user' table has 14800 records, and the 'post' table
has 403000, so I realize this search could take a while, but I don't
see why it's preventing any other queries from getting through.

When it gives up, it eventually complains about a missing file
descriptor, which made me think it was running out of file
descriptors. So I increased the mysql user's open files limit to
1024, and kern.maxfiles to 8192. That doesn't seem to make any
difference, though, and if I do 'mysqladmin extended-status' while the
server is hanging on that query, it only reports around 60-70 open
tables and 120 or so open files.

Any suggestions of other mysql variables I should tweak, or known
issues with MySQL on OpenBSD that could cause this? This same
database was recently working fine on Linux, and a few months ago was
running on a FreeBSD system with the same hardware, so there must be
something about my setup or the way it was compiled from ports that's
causing the problem.


What indexes do you have on 'post' and 'user'?

--
Five Cats
Email to: cats_spam at uk2 dot net
Jul 19 '05 #4
In message <86************ @cail.baugher.p ike.il.us>, Aaron Baugher
<ab******@esc.p ike.il.us> writes
I have an OpenBSD 3.3 system running MySQL 3.23.55 from the ports
tree. Everything started out at the default settings. This system
holds a large vBulletin 2.2.9 forum database, and that's pretty much
the only application that uses any resources.

Everything works fine, except that when the forum administrators do an
IP search, the database locks up and won't respond to any more queries
until it gives up on that search or is restarted. The actual query
that causes the problem is:

SELECT DISTINCT user.userid,use r.username
FROM post,user
WHERE user.userid=pos t.userid
AND post.ipaddress LIKE '192.168.1.2%'
AND user.userid<>0
ORDER BY user.username

For example. The 'user' table has 14800 records, and the 'post' table
has 403000, so I realize this search could take a while, but I don't
see why it's preventing any other queries from getting through.

When it gives up, it eventually complains about a missing file
descriptor, which made me think it was running out of file
descriptors. So I increased the mysql user's open files limit to
1024, and kern.maxfiles to 8192. That doesn't seem to make any
difference, though, and if I do 'mysqladmin extended-status' while the
server is hanging on that query, it only reports around 60-70 open
tables and 120 or so open files.

Any suggestions of other mysql variables I should tweak, or known
issues with MySQL on OpenBSD that could cause this? This same
database was recently working fine on Linux, and a few months ago was
running on a FreeBSD system with the same hardware, so there must be
something about my setup or the way it was compiled from ports that's
causing the problem.


What indexes do you have on 'post' and 'user'?

--
Five Cats
Email to: cats_spam at uk2 dot net
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1780
by: Noah | last post by:
I'm getting configure warnings and make errors when I try to build Python 2.3.4 under OpenBSD 3.5. I don't see anything in the README under "Platform specific note" for OpenBSD. I tried opening the Python tar file using gtar and I tried using gmake just to make sure there wasn't anything weird going on there (I know that using BSD tar when building Zope used to cause problems, so I first thought I might be having a similar problem. I'm...
0
1402
by: Bennett Haselton | last post by:
I found a way to do this before, but I didn't write down how I did it, so I don't remember it now. And I've searched http://www.mysql.com/doc/ in vain. What's the command to show all current locks on a database table? -Bennett bennett@peacefire.org http://www.peacefire.org (425) 497 9002
0
1672
by: niku | last post by:
Hello all. I'm trying to get mysql installed on OpenBSD 3.4. Unfortunately, it appeares that the port only installes the mysql-client, and one needs to install the -server package seperately. This would be fine with one exception, there is a dependency that breaks when installing from ports. This lead me to install from source, and now I'm having problems just getting mysql to start. If anyone could look at the error message below, and...
2
3817
by: Steph L | last post by:
Hi, A given Milter program compiles ok on OpenBSD/FreeBSD/Linux but not on Solaris : it uses daemon(3) http://www.openbsd.org/cgi-bin/man.cgi?query=daemon&apropos=0&sektion =0&manpath=OpenBSD+Current&arch=i386&format=html http://www.freebsd.org/cgi/man.cgi?query=daemon&sektion=3&apropos=0 &manpath=FreeBSD+5.1-RELEASE
1
1737
by: awebguynow | last post by:
I'm investigating this subject, particularly DB interactions, and could use input. It seems the dominant consensus, in these discussions is "use flock() ...." I guess this would be similar to, in Java terms, using synchronized (objLock) { ... } This lends itself to OOP modularization, localization of reads and writes, using locks.
4
1723
by: | last post by:
Hello... i have a table which contains a column named "ask" and a column named "per"... my think is that i want to search in "ask" and echo the data stored in "per" for this entry... How do i do this? Thanx in advance! JBK
1
2855
by: nazgul | last post by:
Hi all, I have an app that runs on multiple boxes. On my slackware box, running Python 2.5.1, top shows this: Mem: 1002736k total, 453268k used, 549468k free, 31392k buffers Swap: 2097136k total, 0k used, 2097136k free, 136876k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2741 dnm 16 0 267m 261m 2676 S 99.3 26.7 14:54.62 python
5
2311
by: nazgul | last post by:
Hi all, In my prev post, I indicated I was using 2.5.1 on one box and 2.5p3 on the OpenBSD box. I'm trying to build 2.5.1 on OpenBSD and I get this: Modules/posixmodule.c:5701: error: `lstat' undeclared (first use in this function) I browsed the source and don't understand why I'm getting it. I'm not a configure expert, but I did figure out that pyconfig.h has these set:
8
2142
by: NMarks | last post by:
Hello all, I have created a database for my work that stores information for keys/locks, doors and employees. Specifically the database contains all the information of our lock system, which doors certain locks are attached to and what employees have keys to certain locks. The form has 3 subforms, 1 is the Key List which is basically the master subform as the other 2 subforms are a Door List and Staff List both of which are linked to...
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.