Joomla smart search indexing ends with an error

I have few articles size about 500KB in script and text each.
I am getting following error each time I try to save the article:
Fatal error: Out of memory (allocated 1408499712) (tried to allocate 1211998 bytes) in /usr/web/iisus/libraries/joomla/database/driver.php on line 1636

Small articles are fine and after saving can be seen as indexed.

As you can see from error I set unlimited memory,
I set Memory Table Limit at indexing options to 2000 and batch from 50 to 5 (minimum).
I changed finder_tokens and finder_tokens_aggregate tables from MEMORY to INNODB.
And all of this don't seem to work.
LVL 16
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Peter HartCommented:
This is probably a php memory configuration and the memory limit can be changed in the php.ini file.
edit the php.ini and look for:

memory_limit = 128M

and increase it.
SSupremeAuthor Commented:
Thanks for your answer, I didn't solve my problem yet.
As you can see from the question 1,408,499,712 bytes allocated, it is equal to 1343M but it isn't enough.
I swap memory from ram to HDD but still, I got so high CPU and for so long that I was banned by the host provider.

I cannot understand why this Joomla smart search doesn't work.
Peter HartCommented:
what is the setting in php.ini for the memory_limit ?
the error message with the memory sizes may be erroneous...
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

SSupremeAuthor Commented:
Atm "memory_limit = -1"

By default I had 128MB, I tired 256, 512, 1024, 32 and 8.
Peter HartCommented:
I would write a file info.php :

and put the following code in it

phpinfo ();

and upload it to the root and run it to see what the actual memory is.
(not sure -1 is correct)

It also may be a corrupt file that joomla is searching through and the size marker is corrupt.?
SSupremeAuthor Commented:

Have a look.
Peter HartCommented:
so its set to -1 that means unlimited and yet it still comes up with that error  so it must be joomla or the files its searching or a database entry is corrupt.
what version Joomla are you running?
you can put it into debug mode and see if the messages help.
in admin so to Global configuration/ system settings and click on Yes and save.
see if that helps.
signing off now till tomorrow
Peter HartCommented:
I would install akeeba admin tools (buy the pro version its not much) and it comes with database tools to check improve and analyse the database,
if that doesn't find anything I would re upload the joomla system files (overwrite the ones there) see if that helps.
Peter HartCommented:
another thought is to switch templates to one of the built in.
then try the search - if that works its a problem with your current template
SSupremeAuthor Commented:
Small articles are fine and after saving can be seen as indexed.
problems with large articles, I use  html markup inside, can it crash because of loop?
SSupremeAuthor Commented:
Fatal error: Out of memory (allocated 1511260160) (tried to allocate 1223002 bytes) in .../libraries/joomla/database/driver.php on line 1636

I tried 1000-4000 lines of html markup at article and it worked fine, after 5000 I got error above.
Peter HartCommented:
to get round it, I would split the large articles into smaller article and link them
SSupremeAuthor Commented:
What do you mean by linking them?
Peter HartCommented:
well I would create a category for a set of articles and then create a menu item (type  category blog )  menu to display that category of articles.
then configure the blog page (under blog layout during menu creation) to say how many and how they are displayed.
then in the all the articles in that category you can configure the articles (under Options) to link previous and next articles in that category etc...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SSupremeAuthor Commented:
I consider it as walk around. Not an option in my case, cannot slit article.
Peter HartCommented:
I know but sometimes bugs have to be walked around ;-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.