question

TophamCherieLee-8618 avatar image
0 Votes"
TophamCherieLee-8618 asked VenkateshDodda-MSFT commented

Function App 500 Failure

My function app was working fine for an entire month and then it started failing and throwing the below error:

Result: Failure Exception: OverflowError: int too big to convert Stack: File "/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/dispatcher.py", line 407, in handleinvocation_request call_result = await self.loop.run_in_executor( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, self.kwargs) File "/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/dispatcher.py", line 649, in _run_sync_func return ExtensionManager.get_sync_invocation_wrapper(context, File "/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/extension.py", line 215, in _raw_invocation_wrapper result = function(*args) File "/home/site/wwwroot/coinMarketTrigger/init.py", line 50, in main df.to_sql('f_crypto', conn, schema='dbo', if_exists='append') File "/home/site/wwwroot/.python_packages/lib/site-packages/pandas/core/generic.py", line 2951, in to_sql return sql.to_sql( File "/home/site/wwwroot/.python_packages/lib/site-packages/pandas/io/sql.py", line 697, in to_sql return pandas_sql.to_sql( File "/home/site/wwwroot/.python_packages/lib/site-packages/pandas/io/sql.py", line 1739, in to_sql total_inserted = sql_engine.insert_records( File "/home/site/wwwroot/.python_packages/lib/site-packages/pandas/io/sql.py", line 1322, in insert_records return table.insert(chunksize=chunksize, method=method) File "/home/site/wwwroot/.python_packages/lib/site-packages/pandas/io/sql.py", line 950, in insert num_inserted = exec_insert(conn, keys, chunk_iter) File "/home/site/wwwroot/.python_packages/lib/site-packages/pandas/io/sql.py", line 857, in _execute_insert result = conn.execute(self.table.insert(), data) File "/home/site/wwwroot/.python_packages/lib/site-packages/sqlalchemy/engine/base.py", line 1306, in execute return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS) File "/home/site/wwwroot/.python_packages/lib/site-packages/sqlalchemy/sql/elements.py", line 326, in _execute_on_connection return connection._execute_clauseelement( File "/home/site/wwwroot/.python_packages/lib/site-packages/sqlalchemy/engine/base.py", line 1498, in _execute_clauseelement ret = self._execute_context( File "/home/site/wwwroot/.python_packages/lib/site-packages/sqlalchemy/engine/base.py", line 1862, in _execute_context self.handle_dbapi_exception( File "/home/site/wwwroot/.python_packages/lib/site-packages/sqlalchemy/engine/base.py", line 2047, in handle_dbapi_exception util.raise(exc_info[1], with_traceback=exc_info[2]) File "/home/site/wwwroot/.python_packages/lib/site-packages/sqlalchemy/util/compat.py", line 207, in raise raise exception File "/home/site/wwwroot/.python_packages/lib/site-packages/sqlalchemy/engine/base.py", line 1799, in _execute_context self.dialect.do_executemany( File "/home/site/wwwroot/.python_packages/lib/site-packages/sqlalchemy/dialects/mssql/pyodbc.py", line 620, in do_executemany super(MSDialect_pyodbc, self).do_executemany( File "/home/site/wwwroot/.python_packages/lib/site-packages/sqlalchemy/engine/default.py", line 729, in do_executemany cursor.executemany(statement, parameters)

azure-functions
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

VenkateshDodda-MSFT avatar image
0 Votes"
VenkateshDodda-MSFT answered VenkateshDodda-MSFT commented

@cherieTopham Thanks for reaching out. Upon reviewing the function logs(took the function app name from the above shared stack error message) we see that function invocation is successful and it consistently failing while trying to execute the below block of code and failing with the error Failure Exception: Overflow Error: int too big to convert Stack

 in _raw_invocation_wrapper result = function(**args) File '/home/site/wwwroot/coinMarketTrigger/__init__.py', line 50, in main df.to_sql('f_crypto', conn, schema='dbo', if_exists='append') 

Looks like you are function is trying to communicate\perform some operations on the sqldb and it is failing I would suggest you debug the function code from local using the visual studio code.

Feel free to reach back to me if you have any further questions.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Venkatesh,

I haven't had time to check but I will this weekend.

Sincerely,

Cherie

0 Votes 0 ·

@TophamCherieLee-8618 , Sure Feel free to reach back to me if you need any further assistance.

0 Votes 0 ·