Uploading Large Text File to Extracted Text Field

43 views
Skip to first unread message

kyo...@dharma.net

unread,
May 21, 2025, 9:47:48 AMMay 21
to ResourceSpace
We have RS version 10.5 on an Ubuntu 24.04.2 LTS serve VM in Parallels Desktop 20.3.0 Pro Edition on a Mac Mini host on Sequoia 15.4.1.

Using PHP 8.3 to access the API, after uploading an MP3 file, I am trying to upload about a 25kB text string to the Extracted Text field (#72, shortname text).

When I upload the first 5,000 characters, it works fine. When I enlarge the string to the full amount, it fails to upload.

I check my PHP.ini limits and increased them from the PHP.ini file that is displayed by PHPInfo(). The settings I chose are:

max_execution_time 1200
memory_limit 4096M
post_max_size 4096M
upload_max_filesize 4096M

At start of program execution, I run: $maxUploadSize = ini_get(upload_max_filesize) and it returns only 2M. Still this seems large enough.

I removed the .htaccess file from the webroot, since it seemed to be ineffective.

Any ideas? Is it not allowable to load such a large amount of text into a field? I would like to make it searchable, perhaps by indexing it. 

Thanks for any suggestions you can come up with.

kyo...@dharma.net

unread,
Jul 5, 2025, 4:39:53 PMJul 5
to ResourceSpace
Hi - It's Apache. URI too long. 414 Request-URI Too Long. 

To resolve the 414 error, you can increase the URI length limit on your server. For Apache servers, you can adjust the LimitRequestLine directive in the apache2.conf file, increasing its value to a higher number, such as 256000.2 For Nginx servers, you can modify the large_client_header_buffers setting in the nginx.conf file, increasing the size from 8K to 128K.

That was easy. If only I knew why when I started. I keep forgetting that ResourceSpace echos error code to the browser window where debugging with XDebug is being recorded. It had the 414, but I didn't see it. I was too busy looking into log files. 

kyo...@dharma.net

unread,
Jul 5, 2025, 4:53:33 PMJul 5
to ResourceSpace
Given that indexing large text fields is not always a good idea, I am thinking that indexing a content field like the one I am now uploading, which averages 25K to 50K bytes, is probably OK. 

Do you think I should simply modify the field settings in RS Admin, or actually use a SQL modification to take advantage of the FULLTEXT feature, as mentioned here:

The ALTER TABLE command in MySQL can also be used to add a Full-Text Index to an existing table. Here is an example syntax for adding a Full Text Index in MySQL using ALTER TABLE statement:

ALTER TABLE <table_name> ADD FULLTEXT(<column_name>);

Reply all
Reply to author
Forward
0 new messages