If I remember correctly, the default Fetch Size for Postgresql is to
get all the rows at once, which can certainly cause the problem.
Perhaps try setting Fetch Size to something like 1000 or so and see if
that alleviates the problem.

Regards,
Matt

On Thu, Jan 4, 2024 at 8:48 AM Etienne Jouvin <lapinoujou...@gmail.com> wrote:
>
> Hello.
>
> I also think the problem is more about the processor, I guess ExecuteSQL.
>
> Should play with batch configuration and commit flag to commit intermediate 
> FlowFile.
>
> The out of memory exception makes me believe the full table is retrieved, and 
> if it is huge the FlowFile content is very large.
>
>
>
>
> Le jeu. 4 janv. 2024 à 14:37, Pierre Villard <pierre.villard...@gmail.com> a 
> écrit :
>>
>> It should be memory efficient so I think this is likely a configuration 
>> aspect of your processor. Can you share the configuration for all properties?
>> As a side note: if NiFi ran out of memory, you'd always want to restart it 
>> because you are never sure what's the state of the JVM after an OOME.
>>
>> Le jeu. 4 janv. 2024 à 17:26, <e-soci...@gmx.fr> a écrit :
>>>
>>>
>>> Hello all,
>>>
>>> Who could help me to determine the cpu/memory need for nifi instance to 
>>> fetch the data from Postgresql hosted in google ?
>>>
>>> We got this error :
>>> ==> Error : executesql.error.message
>>> Ran out of memory retrieving query results.
>>>
>>> The procesor ExecuteSQL has this config : Set Auto Commit ==> false
>>> driver Jar to use : postgresql-42.7.1.jar
>>> Java version : jdk-11.0.19
>>>
>>> Table information :
>>>     rows number : 14958836
>>>     fields number : 20
>>>
>>> Linux Rocky8
>>>
>>> Architecture:        x86_64
>>> CPU op-mode(s):      32-bit, 64-bit
>>> Byte Order:          Little Endian
>>> CPU(s):              2
>>> On-line CPU(s) list: 0,1
>>> Thread(s) per core:  2
>>> Core(s) per socket:  1
>>> Socket(s):           1
>>> NUMA node(s):        1
>>> Vendor ID:           GenuineIntel
>>> BIOS Vendor ID:      Google
>>> CPU family:          6
>>> Model:               85
>>> Model name:          Intel(R) Xeon(R) CPU @ 2.80GHz
>>> Stepping:            7
>>> CPU MHz:             2800.286
>>> BogoMIPS:            5600.57
>>> Hypervisor vendor:   KVM
>>> Virtualization type: full
>>> L1d cache:           32K
>>> L1i cache:           32K
>>> L2 cache:            1024K
>>> L3 cache:            33792K
>>> NUMA node0 CPU(s):   0,1
>>>
>>> Memory : 8GB
>>>
>>> Thanks for you helps
>>>
>>> Minh

Reply via email to