[MDEV-11285] Table handler out of memory Created: 2016-11-15  Updated: 2018-11-16

Status: Stalled
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 10.1
Fix Version/s: 10.1

Type: Bug Priority: Major
Reporter: Niels Assignee: Elena Stepanova
Resolution: Unresolved Votes: 0
Labels: None

Attachments: Text File SHOW INDEX IN updates_search.txt    

 Description   

PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 128 Table handler out of memory in /home/root/datasearch.php:298 Stack trace:
It seems that the "tabler handler" has run out of memory. But I can't find how to increase this in the settings from MySQL/MariaDB or if this is even something you can adjust.
The query is a simple MATCH AGAINST but is expected to return a few million results. We want this for statistics analysis so it's wanted to get that many results back.

This is info on the server: https://jira.mariadb.org/browse/MDEV-11063
Nothing has changed in the settings since then.



 Comments   
Comment by Elena Stepanova [ 2016-11-17 ]

niels1189,

Can you run the same query outside PHP, directly from the client, and see what happens?
Please paste the query itself and, if it uses other tables than mentioned in MDEV-11063, the same information about these additional tables.

Thanks.

Comment by Elena Stepanova [ 2016-12-17 ]

Closing for now. To re-open, please comment when you have further information on the issue.

Comment by Niels [ 2016-12-17 ]

This has not been resolved or addressed. So I'm not sure why you're closing this.

Comment by Elena Stepanova [ 2016-12-17 ]

It's closed not as fixed, but as incomplete, because there was a request for additional information in the previous comment, and it wasn't answered for a month. If you can provide the requested info, the report will be re-opened.

Comment by Maksim Kapustin [ 2017-04-02 ]

In one of our projects, we are faced with a similar problem.
The fact is that we have one table, which we have formed to search from the tectonic fields. Created an index.
The search works fine. But we are also looking to the address.
In the table of 25M records and in almost every record, the text "city" or "street" occurs.
When trying to find the text "our street", we get a similar error.
We tried to make a request directly in the client database, received the same error.

We came out to overcome this problem, but by removing from the texts in the addresses, these words. But this is not right, I would not want to modify the texts to avoid such a mistake.

Maybe you'll tell us which options we need to pay attention to in the settings, what to prevent the occurrence of such an error.

Comment by Elena Stepanova [ 2017-05-01 ]

maksimkapustin,

Can you paste the query itself and tables, views and any structures that it references? (SHOW CREATE TABLE and SHOW INDEX IN for every table).

Comment by Maksim Kapustin [ 2017-05-25 ]

CREATE TABLE `updates_search` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`regs_id` bigint(20) unsigned DEFAULT NULL,
`root_id` bigint(20) unsigned DEFAULT NULL,
`code` varchar(255) NOT NULL DEFAULT '',
`names_display` text NOT NULL,
`names_short_en` text NOT NULL,
`address_country` varchar(255) NOT NULL DEFAULT '',
`address_zip` varchar(255) NOT NULL DEFAULT '',
`address_address` text NOT NULL,
`contacts_email` varchar(255) NOT NULL DEFAULT '',
`contacts_tel1` varchar(32) NOT NULL,
`contacts_tel2` varchar(32) NOT NULL,
`contacts_fax` varchar(64) NOT NULL,
`contacts_web_page` varchar(255) NOT NULL,
`beacon_pers_ident` varchar(32) NOT NULL,
`registration_date` datetime DEFAULT NULL,
`activity_kinds` longtext NOT NULL,
`activity_kinds2010` longtext NOT NULL,
`assignees` longtext NOT NULL,
`founders` longtext NOT NULL,
`branches` longtext NOT NULL,
`heads` longtext NOT NULL,
`predecessors` longtext NOT NULL,
`registrations` longtext NOT NULL,
`actual` tinyint(1) DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_updates_search_regs_id` (`regs_id`),
KEY `IDX_updates_search_registratio` (`registration_date`),
KEY `IDX_updates_search_actual` (`actual`),
KEY `UK_updates_search_root_id` (`root_id`),
FULLTEXT KEY `IDX_updates_search` (`code`,`names_display`,`names_short_en`,`address_country`,`address_zip`,`address_address`,`contacts_email`,`contacts_tel1`,`contacts_tel2`,`contacts_fax`,`contacts_web_page`,`beacon_pers_ident`,`activity_kinds`,`activity_kinds2010`,`assignees`,`founders`,`branches`,`heads`,`predecessors`,`registrations`)
) ENGINE=InnoDB

Comment by Maksim Kapustin [ 2017-05-25 ]

SHOW INDEX IN updates_search.txt

Comment by Bruce Duhamel [ 2018-11-16 ]

I have reproduced this error today.

MariaDB 10.0.24

Our database is proprietary, so I can't share specifics.

I have an Innodb table with ~20M rows of company profiles (company name, address, phone, etc).
This table includes a composite full text index on company name and trade name.

We have a query against this table that uses the match against syntax, e.g.
MATCH (company_name , trade_name) AGAINST ('NEED CAR "LLC"' )

This normally works without issue, however, the specific company name in that example included double quotes. Since we are running in the default full text matching mode, natural language mode, double quotes will require that phrase match literally as typed.

In our data, "LLC" is very common. > 3M records include the text LLC. We've seen this failure with a server with 8GB of RAM and the same data on a machine with 120GB of RAM.

Please let me know if I can help with further information.

Generated at Thu Feb 08 07:48:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.