# You have reached the limit of custom field allowed in your database

**URL:** <https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147>\
**Category:** Product Support\
**Tags:** community, discussion\
**Created:** [February 28, 2020, 9:34am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147 "2020-02-28T09:34:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![maemoon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/maemoon/32/1835_2.png) [@maemoon](https://forum.mautic.org/u/maemoon)\
**Post date:** [February 28, 2020, 9:34am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/1 "2020-02-28T09:34:44Z")

</div>

**Your software**  
My Mautic version is: v2.16.0  
My PHP version is: 7.2.27

**Custom field limit**  
My problem is: to add custom fields i have to add mare then 200 custom field and when i reached to 110 it give error that **(You have reached the limit of custom field allowed in your database)**

 ![Screenshot_2](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/1b2ead91147176d6c041f99059451cc0a2f931b3.png)  
How i can increase this li it in my database???  
Thanks

---

<div class="post-metadata">

**Author:** ![autoize](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/autoize/32/105_2.png) [@autoize](https://forum.mautic.org/u/autoize)\
**Post date:** [February 29, 2020, 11:51pm UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/2 "2020-02-29T23:51:51Z")

</div>

> [@maemoon](#):
>
> You have reached the limit of custom field allowed

Appears related to this Github issue.

Mautic creates additional custom fields as **columns** in the `leads` table, and MySQL imposes a limit on how many columns or bytes of data there can be in a particular row. Wonder if upgrading to MySQL 8.0 from MySQL 5.7 would expand the number of columns possible.

> <https://github.com/mautic/mautic/issues/3202>
>
> What type of report is this:
> 
> | Q | A
> | ---| ---
> | Bug report? | Y
> | Featu…re request? | N
> | Enhancement? | N
> 
> \## Description:
> When trying to update schema, I'm getting the following error.
> 
> SQLSTATE\[42000\]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
> 
> I think the problem is when you create over a certain amount of custom fields, you go over row size limit. From what I've read, perhaps the leads table need to split after a certain number of fields to prevent this as your list of custom fields grow.
> 
> I've tried unsuccessfully all the suggestions/recommendations:
> https://drupal.stackexchange.com/questions/47908/pdoexception-sqlstate42000-syntax-error-or-access-violation
> https://stackoverflow.com/questions/3927690/howto-clean-a-mysql-innodb-storage-engine/4056261#4056261
> https://stackoverflow.com/questions/34804962/sqlstate42000-syntax-error-or-access-violation-row-size-too-large
> https://craftcms.stackexchange.com/questions/11480/internal-server-error-sqlstate42000-1118-row-size-too-large
> 
> \## If a bug:
> 
> | Q | A
> | --- | ---
> | Mautic version | 2.5.1
> | PHP version | 7.0.14
> 
> \### Steps to reproduce:
> 1. Create a bunch of custom fields
> 2. Try to do a schema update via the command line command. php app/console doctrine:schema:update --force
>  
> \### Log errors: 
> 
> \_Please check for related errors in the latest log file in \[mautic root\]/app/log/ and/or the web server's logs and post them here. Be sure to remove sensitive information if applicable.\_ 
> 
> \[2017-01-06 16:44:40\] mautic.NOTICE: Doctrine\\DBAL\\Exception\\DriverException: An exception occurred while executing 'ALTER TABLE ######leads CHANGE website website LONGTEXT DEFAULT NULL, CHANGE casual\_name casual\_name VARCHAR(255) DEFAULT NULL, CHANGE sourcecode sourcecode VARCHAR(255) DEFAULT NULL, CHANGE alternate\_apn alternate\_apn VARCHAR(255) DEFAULT NULL, CHANGE assessment\_year assessment\_year VARCHAR(255) DEFAULT NULL, CHANGE bathrooms bathrooms VARCHAR(255) DEFAULT NULL, CHANGE bedrooms bedrooms VARCHAR(255) DEFAULT NULL, CHANGE bldg\_\_living\_area bldg\_\_living\_area VARCHAR(255) DEFAULT NULL, CHANGE census\_tract census\_tract VARCHAR(255) DEFAULT NULL, CHANGE county\_land\_use\_code county\_land\_use\_code VARCHAR(255) DEFAULT NULL, CHANGE county\_name county\_name VARCHAR(255) DEFAULT NULL, CHANGE days\_since\_mtg days\_since\_mtg VARCHAR(255) DEFAULT NULL, CHANGE fico fico VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_amount first\_mortgage\_amount VARCHAR(255) DEFAULT NULL, CHANGE first\_mortage\_ballon\_loan first\_mortage\_ballon\_loan VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_interest\_r first\_mortgage\_interest\_r VARCHAR(255) DEFAULT NULL, CHANGE first\_mortage\_junior\_pres first\_mortage\_junior\_pres VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_lender\_add first\_mortgage\_lender\_add VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_lender\_cit first\_mortgage\_lender\_cit VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_lender\_nam first\_mortgage\_lender\_nam VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_lender\_sta first\_mortgage\_lender\_sta VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_lender\_zip first\_mortgage\_lender\_zip VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_lender\_zip1 first\_mortgage\_lender\_zip1 VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_loan\_rate first\_mortgage\_loan\_rate VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_ltv first\_mortgage\_ltv VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgge\_matured first\_mortgge\_matured VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_primary\_lo first\_mortgage\_primary\_lo VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_private\_pa first\_mortgage\_private\_pa VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_seller\_car first\_mortgage\_seller\_car VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_term first\_mortgage\_term VARCHAR(255) DEFAULT NULL, CHANGE first\_mortgage\_transactio first\_mortgage\_transactio VARCHAR(255) DEFAULT NULL, CHANGE loanintent loanintent VARCHAR(255) DEFAULT NULL, CHANGE foreclosed foreclosed VARCHAR(255) DEFAULT NULL, CHANGE va\_eligible va\_eligible VARCHAR(255) DEFAULT NULL, CHANGE past\_bk past\_bk VARCHAR(255) DEFAULT NULL, CHANGE homesetad\_exemption homesetad\_exemption VARCHAR(255) DEFAULT NULL, CHANGE improved improved VARCHAR(255) DEFAULT NULL, CHANGE improved\_value improved\_value VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_amount junior\_1\_mtg\_amount VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_ballon\_loan junior\_1\_mtg\_ballon\_loan VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_credit\_line junior\_1\_mtg\_credit\_line VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_equity\_loan junior\_1\_mtg\_equity\_loan VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_interest\_rat junior\_1\_mtg\_interest\_rat VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_lender\_addre junior\_1\_mtg\_lender\_addre VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_lender\_city junior\_1\_mtg\_lender\_city VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_lender\_name junior\_1\_mtg\_lender\_name VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_lender\_state junior\_1\_mtg\_lender\_state VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_lender\_zip\_c junior\_1\_mtg\_lender\_zip\_c VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_lender\_\_4 junior\_1\_mtg\_lender\_\_4 VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_loan\_rate\_ty junior\_1\_mtg\_loan\_rate\_ty VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_matured junior\_1\_mtg\_matured VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_maturity\_rat junior\_1\_mtg\_maturity\_rat VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_primary\_loan junior\_1\_mtg\_primary\_loan VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_private\_part junior\_1\_mtg\_private\_part VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_seller\_carry junior\_1\_mtg\_seller\_carry VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_term junior\_1\_mtg\_term VARCHAR(255) DEFAULT NULL, CHANGE junior\_1\_mtg\_transaction junior\_1\_mtg\_transaction VARCHAR(255) DEFAULT NULL, CHANGE land\_value land\_value VARCHAR(255) DEFAULT NULL, CHANGE last\_market\_sale\_price\_ty last\_market\_sale\_price\_ty VARCHAR(255) DEFAULT NULL, CHANGE level level VARCHAR(255) DEFAULT NULL, CHANGE lot\_acreage lot\_acreage VARCHAR(255) DEFAULT NULL, CHANGE lot\_area lot\_area VARCHAR(255) DEFAULT NULL, CHANGE lu1limit lu1limit VARCHAR(255) DEFAULT NULL, CHANGE mail\_carrier\_route mail\_carrier\_route VARCHAR(255) DEFAULT NULL, CHANGE most\_recent\_mortgage\_trad most\_recent\_mortgage\_trad VARCHAR(255) DEFAULT NULL, CHANGE mtg\_trigger\_days mtg\_trigger\_days VARCHAR(255) DEFAULT NULL, CHANGE mtg\_trigger\_flag mtg\_trigger\_flag VARCHAR(255) DEFAULT NULL, CHANGE mtg08 mtg08 VARCHAR(255) DEFAULT NULL, CHANGE mtg13 mtg13 VARCHAR(255) DEFAULT NULL, CHANGE mtg19 mtg19 VARCHAR(255) DEFAULT NULL, CHANGE order\_record\_id order\_record\_id VARCHAR(255) DEFAULT NULL, CHANGE owner\_occupied owner\_occupied VARCHAR(255) DEFAULT NULL, CHANGE owner\_transfer\_recording owner\_transfer\_recording VARCHAR(255) DEFAULT NULL, CHANGE owner\_transfer\_sale\_date owner\_transfer\_sale\_date VARCHAR(255) DEFAULT NULL, CHANGE owner\_transfer\_sale\_price owner\_transfer\_sale\_price VARCHAR(255) DEFAULT NULL, CHANGE parcel\_id parcel\_id VARCHAR(255) DEFAULT NULL, CHANGE phone\_dnc phone\_dnc VARCHAR(255) DEFAULT NULL, CHANGE pin\_code pin\_code VARCHAR(255) DEFAULT NULL, CHANGE pr\_26 pr\_26 VARCHAR(255) DEFAULT NULL, CHANGE pr\_84 pr\_84 VARCHAR(255) DEFAULT NULL, CHANGE prior\_market\_sale\_price prior\_market\_sale\_price VARCHAR(255) DEFAULT NULL, CHANGE property\_tax\_amount property\_tax\_amount VARCHAR(255) DEFAULT NULL, CHANGE property\_type property\_type VARCHAR(255) DEFAULT NULL, CHANGE state\_land\_use\_code state\_land\_use\_code VARCHAR(255) DEFAULT NULL, CHANGE swimming\_pool\_present swimming\_pool\_present VARCHAR(255) DEFAULT NULL, CHANGE total\_assessed\_value total\_assessed\_value VARCHAR(255) DEFAULT NULL, CHANGE year\_built year\_built VARCHAR(255) DEFAULT NULL, CHANGE do\_not\_call\_home do\_not\_call\_home VARCHAR(255) DEFAULT NULL, CHANGE do\_not\_call\_work do\_not\_call\_work VARCHAR(255) DEFAULT NULL, CHANGE loan\_officer loan\_officer VARCHAR(255) DEFAULT NULL, CHANGE subject\_property\_address subject\_property\_address VARCHAR(255) DEFAULT NULL, CHANGE subject\_property subject\_property VARCHAR(255) DEFAULT NULL, CHANGE subject\_property\_city subject\_property\_city VARCHAR(255) DEFAULT NULL, CHANGE subject\_property\_state subject\_property\_state VARCHAR(255) DEFAULT NULL, CHANGE subject\_property\_zip subject\_property\_zip VARCHAR(255) DEFAULT NULL, CHANGE coborrower\_first\_name coborrower\_first\_name VARCHAR(255) DEFAULT NULL, CHANGE coborrower\_last\_name coborrower\_last\_name VARCHAR(255) DEFAULT NULL, CHANGE borrower\_gender borrower\_gender VARCHAR(255) DEFAULT NULL, CHANGE coborrower\_gender coborrower\_gender VARCHAR(255) DEFAULT NULL, CHANGE coborrower\_email coborrower\_email VARCHAR(255) DEFAULT NULL, CHANGE agent\_first\_name agent\_first\_name VARCHAR(255) DEFAULT NULL, CHANGE agent\_last\_name agent\_last\_name VARCHAR(255) DEFAULT NULL, CHANGE agent\_company agent\_company VARCHAR(255) DEFAULT NULL, CHANGE agent\_address agent\_address VARCHAR(255) DEFAULT NULL, CHANGE agent\_city agent\_city VARCHAR(255) DEFAULT NULL, CHANGE agent\_state agent\_state VARCHAR(255) DEFAULT NULL, CHANGE agent\_zip agent\_zip VARCHAR(255) DEFAULT NULL, CHANGE agent\_phone agent\_phone VARCHAR(255) DEFAULT NULL, CHANGE agent\_cell agent\_cell VARCHAR(255) DEFAULT NULL, CHANGE agent\_email agent\_email VARCHAR(255) DEFAULT NULL, CHANGE guid guid VARCHAR(255) DEFAULT NULL, CHANGE zillow\_url zillow\_url VARCHAR(255) DEFAULT NULL, CHANGE nmlsid nmlsid VARCHAR(255) DEFAULT NULL': SQLSTATE\[42000\]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs (uncaught exception) at /var/www/mautic.######.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command \`doctrine:schema:update\` \[\] \[\]
> \[2017-01-06 16:44:45\] mautic.WARNING: Command \`doctrine:schema:update\` exited with status code 1 \[\] \[\]

There is an **extended field plugin** that is mentioned in this linked issue, which may help for your particular use case.

> <https://github.com/mautic/mautic/issues/4139>
>
> | Q | A
> | ---| ---
> | Bug report? | 
> | Feature request? | ✓
> | Enhancement? |… ✓
> 
> \## Description:
> 
> Today, when a contact field is created, Mautic does two things:
> 1. It creates a entry in the \`lead\_fields\` table containing the metadata of that field
> 2. It adds a columns to the \`leads\` table which will then contain the actual contents of that field
> 
> The problem today is that MySQL tables are limited in width by the very nature of how RDBMSs work. This means that adding too custom fields, especially text fields which are stored as \`VARCHAR(255)\` results in problems between what Doctrine thinks should be in the database and the actual schema (see https://github.com/mautic/mautic/issues/3202#issuecomment-279751132 and https://github.com/mautic/mautic/issues/3202).
> 
> Some possible quick fixes:
> \- Limiting the number of custom fields the user can create
> \- Store custom fields in \_narrower\_ data types such as \`TEXT\` instead of \`VARCHAR(255)\`
> 
> Neither of these would adresse the real issue with the current structure, custom fields are limited.
> This is especially problematic for CRM users who want to find \*\*all\*\* of their data in both their marketing automation solution and CRM solution.
> 
> Therefore, I think the only way forward is to drastically restructure contact fields. There is already some structure in place with the \`lead\_fields\` table. I think what we would need to do would be to create a \`lead\_fields\_leads\_xref\` table which would have the following structure
> 
> | Lead ID 🔑 | Lead Field ID :key: | Content | (maybe some metadata columns...)
> | --- | --- | --- | --- |
> | 42 (My contact ID) | 3 (First name field ID) | Maximilien | |
> | ... | ... | ... | |
> | 42 (Still my contact ID | 1337 (Salesforce opportunity closing date field ID) | 24/05/2017 | |
> | ... | ... | ... | |
> 
> This would allow (practically) infinite custom fields.
> 
> @alanhartless, @matishaladiwala I would love to have your feedback on this issue!

---

<div class="post-metadata">

**Author:** ![pjongbloed](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/pjongbloed/32/2073_2.png) [@pjongbloed](https://forum.mautic.org/u/pjongbloed)\
**Post date:** [April 22, 2020, 4:04pm UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/3 "2020-04-22T16:04:55Z")

</div>

We’re exploring Mautic as a solution and would also require a fair amount of custom fields for our purposes. Have you tried the plugin that was mentioned and did you have success with it?

---

<div class="post-metadata">

**Author:** ![simas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/simas/32/724_2.png) [@simas](https://forum.mautic.org/u/simas)\
**Post date:** [April 30, 2020, 7:32am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/4 "2020-04-30T07:32:18Z")

</div>

I’ve tried the plugin. I added around 300 custom fields, didn’t test it extensively, but so far so good

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [July 13, 2021, 7:30am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/5 "2021-07-13T07:30:39Z")

</div>

For the first time in years I have hit this error. It is super strange as I have many instances of Mautic installed with way more fields I am trying to do at the moment.

This is a clean install on 3.3.3.

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [December 23, 2021, 9:55am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/6 "2021-12-23T09:55:51Z")

</div>

Anyone know of a good workaround here, I am hitting the same problem with an installation of 4.1.0.

Also I have tried the extension however I am not sure it is compatable with 4.1.0 as after installing it was unable to create any new fields or edit old fields

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [December 27, 2021, 1:01am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/7 "2021-12-27T01:01:23Z")

</div>

I took a quick look. If you looked at the issue above I think you can see that, there is limit related to MySQL, so I think your chances are:

- migrate the plugin to Mautic 4 (since you said it does not work as expected anymore)
- add new fields programatically via new table - for example: my:\_table which has a column lead\_id (FK to lead table).

---

<div class="post-metadata">

**Author:** ![alexhammer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alexhammer/32/14525_2.png) [@alexhammer](https://forum.mautic.org/u/alexhammer)\
**Post date:** [January 14, 2022, 10:08am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/8 "2022-01-14T10:08:58Z")

</div>

I came accross this problem today and the extended fields plugin doesn’t work properly with 4.1. anymore.  
Also I needed a specific action which was introduced in Mautic 4.1 - send email to user with token support. This is not possible if the token would be one from the extended fields plugin - because the token alias gets looked up inside the “lead” table and not inside “lead fields” table.  
Anyway.

I took a deeper look into the actual problem in the database:

Text fields get inserted into the database as “varchar” and the character number -

- system fields are defined as varchar with 191 characters
- new text customfields are varchar with 255 characters

The mysql limitation is that a table can not exceed 65,535-byte row size.

This means you can create as many fields until you hit the 65,535-bytes.  
Therefor you can:

- change the varchar characters to the actually needed size:  
(i.e if you only need the words red or blue you could limit the characters to 4 - because blue has only 4 characters)
- or you change the fields to text instead of varchar - but this makes them non-indexable - means the search for something in the database gets a lot slower.

I changed most of my fields to a varchar character value of 99 or 49  
after i did that with almost 100 fields I was able to insert all the other fields I needed 🙂

---

<div class="post-metadata">

**Author:** ![veit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/veit/32/2018_2.png) [@veit](https://forum.mautic.org/u/veit)\
**Post date:** [February 23, 2022, 4:11pm UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/9 "2022-02-23T16:11:57Z")

</div>

Hi Alex,

how did you go about doing that for the individual fields?

Thanks!

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [March 13, 2022, 1:02pm UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/10 "2022-03-13T13:02:04Z")

</div>

Hi

Digging up old issues here.

So in order to update the size of a specific column can be done inside mysql with the following command:

```auto
alter table leads MODIFY column_name varchar(99);

```

where column\_name is the column you want to change.

Now for my questions, inside one of my instances I am getting the following error:

```auto
ERROR 1054 (42S22): Unknown column '`mautic`.`l`.`email`' in 'GENERATED ALWAYS'

```

Anyone know how I can fix this, as I cannot change the size of any columns

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [March 14, 2022, 10:03am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/11 "2022-03-14T10:03:12Z")

</div>

tagging you @jester as you replied to a previous post and seem to maybe have the mysql expertise to hopefully help me out on this one as well.

---

<div class="post-metadata">

**Author:** ![jester](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jester/32/7067_2.png) [@jester](https://forum.mautic.org/u/jester)\
**Post date:** [March 15, 2022, 7:47am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/12 "2022-03-15T07:47:08Z")

</div>

@mikew could you you give exact query? It’s a bit hard to understand what’s triggering the error

---

<div class="post-metadata">

**Author:** ![alexhammer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alexhammer/32/14525_2.png) [@alexhammer](https://forum.mautic.org/u/alexhammer)\
**Post date:** [April 7, 2022, 2:57pm UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/13 "2022-04-07T14:57:24Z")

</div>

As @mikew described you could just use the “alter table” sql to change a field.  
The easiest way would be to simply open the database in phpmyadmin or adminer \> navigate to the table lead\_fields and change the values there. 🙂

---

<div class="post-metadata">

**Author:** ![bb0x88](https://avatars.discourse-cdn.com/v4/letter/b/7ab992/32.png) [@bb0x88](https://forum.mautic.org/u/bb0x88)\
**Post date:** [July 24, 2024, 9:23pm UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/14 "2024-07-24T21:23:36Z")

</div>

I changed my label and alias VARCHAR from 191 to 100 in the lead\_fields table

but I still get the same error, were some other things needed to be changed?

---

<div class="post-metadata">

**Author:** ![bb0x88](https://avatars.discourse-cdn.com/v4/letter/b/7ab992/32.png) [@bb0x88](https://forum.mautic.org/u/bb0x88)\
**Post date:** [July 24, 2024, 9:46pm UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/15 "2024-07-24T21:46:01Z")

</div>

ok its the VARCHAR of the columns in the leads table that need to be modified

Is it safe to delete unwanted custom fields in the leads table in the database?

---

<div class="post-metadata">

**Author:** ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)\
**Post date:** [July 25, 2024, 4:17am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/16 "2024-07-25T04:17:42Z")

</div>

Manage them from mautic’s interface  
mautic \> custom fields  
Only delete what Mautic let’s you delete or modify the code to prevent mautic search for them.

BTW why do you need so many fields? Can you give me an example of what you are trying to achieve?

I mean, you can probably add values into the same field separated by commas and then fetch the data as you need it. If this is not your case, then a plugin will be needed.

---

<div class="post-metadata">

**Author:** ![bb0x88](https://avatars.discourse-cdn.com/v4/letter/b/7ab992/32.png) [@bb0x88](https://forum.mautic.org/u/bb0x88)\
**Post date:** [July 25, 2024, 4:53am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/17 "2024-07-25T04:53:59Z")

</div>

Ah yes i can see i can delete from UI

It’s not me, the marketing guys want these fields, just extra data I suppose + I think quite a few of these fields are auto generated by other things in our setup

---

<div class="post-metadata">

**Author:** ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)\
**Post date:** [July 25, 2024, 5:03am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/18 "2024-07-25T05:03:59Z")

</div>

Unfortunately the fields that come with mautic can’t be deleted, but there is a new function (or plugin?) for mautic 4 or 5 (can’t remember it, read it in the forum) that let’s you reduce the lenght of mautic default fields.

By doing that, you can free loads of space for other new columns.

---

<div class="post-metadata">

**Author:** ![email-buddy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/email-buddy/32/12401_2.png) [@email-buddy](https://forum.mautic.org/u/email-buddy)\
**Post date:** [July 29, 2024, 11:52am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/19 "2024-07-29T11:52:40Z")

</div>

I’m not sure if this is the right place to post this, but I’ve been searching the forum for over an hour and can’t find a straightforward way to create a new post. I apologize to the original poster for adding my question here, but I’m really lost.

I’ve just installed the new version of the software, and as a first-time user, I’m running into some issues. Everything seems to be installed correctly, but I’m using a VPS server instead of a dedicated server. I’ve set it up under a subdomain, and while sending and tracking emails works fine, I’m having trouble with the Campaign Builder. Every time I try to create an email, I get the error message: “Your request could not be processed, please try again.” The logs don’t seem to provide any clues.

I’ve reinstalled the software three times now and keep facing the same issue. The software is behind a basic firewall, and I can’t find any documentation about specific port requirements. Can anyone help me out? I’m getting really frustrated with this and am about to give up on it, even though it came highly recommended. Thanks in advance for any assistance! I feel like I could bang my head off the wall looking for a solution. I don’t understand why it’s so hard with such popular software specially open source not defined simple documentation that could guide you through turning on the bug mode or a more defined way to find errors, in the logs

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [July 29, 2024, 11:55am UTC](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147/20 "2024-07-29T11:55:37Z")

</div>

Its to early to tell at this point but the issue might be due to the fact that you are behind the firewall.

I am happy to take a look at the issue for you, please DM me and we can schedule a meeting.

[Next page](https://forum.mautic.org/t/you-have-reached-the-limit-of-custom-field-allowed-in-your-database/13147.md?page=2)
